Multi client/server: log fewer exceptions

This commit is contained in:
Bonta-kun
2019-12-16 18:39:00 +01:00
parent ec1b9eca43
commit 04f5f2fa84
2 changed files with 3 additions and 3 deletions

View File

@@ -102,7 +102,7 @@ async def server(websocket, path, ctx : Context):
args = msg[1]
await process_client_cmd(ctx, client, cmd, args)
except Exception as e:
if type(e) is not websockets.ConnectionClosed:
if not isinstance(e, websockets.WebSocketException):
logging.exception(e)
finally:
await on_client_disconnected(ctx, client)