loudly fail on connection errors.

This commit is contained in:
Fabian Dill 2020-04-19 13:44:22 +02:00
parent 48e304a091
commit b676d4131f
1 changed files with 1 additions and 4 deletions

View File

@ -581,10 +581,7 @@ async def snes_flush_writes(ctx : 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))
async def server_loop(ctx : Context, address = None):
if ctx.socket is not None: