loudly fail on connection errors.
This commit is contained in:
parent
48e304a091
commit
b676d4131f
|
@ -581,10 +581,7 @@ async def snes_flush_writes(ctx : Context):
|
||||||
async def send_msgs(websocket, msgs):
|
async def send_msgs(websocket, msgs):
|
||||||
if not websocket or not websocket.open or websocket.closed:
|
if not websocket or not websocket.open or websocket.closed:
|
||||||
return
|
return
|
||||||
try:
|
|
||||||
await websocket.send(json.dumps(msgs))
|
await websocket.send(json.dumps(msgs))
|
||||||
except websockets.ConnectionClosed:
|
|
||||||
pass
|
|
||||||
|
|
||||||
async def server_loop(ctx : Context, address = None):
|
async def server_loop(ctx : Context, address = None):
|
||||||
if ctx.socket is not None:
|
if ctx.socket is not None:
|
||||||
|
|
Loading…
Reference in New Issue