Open
Description
See #2220
In v21.9, a new WebsocketClosed
exception was added.
While you can to do the following:
@app.websocker("/")
async def handler(request, ws):
try:
...
except asyncio.CancelledError:
print("connection closed")
We would like to add support for this pattern:
@app.websocker("/")
async def handler(request, ws):
try:
...
except sanic.exceptions.WebsocketClosed:
print("connection closed")