Багфикс
This commit is contained in:
parent
93658a0aa3
commit
69e5bb3c29
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
import logging
|
||||
from collections import defaultdict
|
||||
|
||||
import websockets
|
||||
|
@ -138,7 +139,8 @@ async def websocket_endpoint(
|
|||
reason = e.detail
|
||||
code_and_reason = (code, reason)
|
||||
await manager.disconnect(chat_id=chat_id, websocket=websocket, code_and_reason=code_and_reason)
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
logging.warning(e)
|
||||
code_and_reason = (status.WS_1011_INTERNAL_ERROR, "Internal Server Error")
|
||||
await manager.disconnect(chat_id=chat_id, websocket=websocket, code_and_reason=code_and_reason)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue