mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
loudly fail on connection errors.
This commit is contained in:
@@ -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:
|
||||||
|
Reference in New Issue
Block a user