mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Don't ignore disconnects when they happen during data transfer, instead properly disconnect the client
This commit is contained in:
@@ -99,10 +99,7 @@ class Context:
|
||||
async def send_msgs(websocket, msgs):
|
||||
if not websocket or not websocket.open or websocket.closed:
|
||||
return
|
||||
try:
|
||||
await websocket.send(json.dumps(msgs))
|
||||
except websockets.ConnectionClosed:
|
||||
pass
|
||||
await websocket.send(json.dumps(msgs))
|
||||
|
||||
def broadcast_all(ctx : Context, msgs):
|
||||
for client in ctx.clients:
|
||||
|
Reference in New Issue
Block a user