do not output canceled errors to get rid from scarry traceback on the proxy termination

This commit is contained in:
Alexander Bersenev
2019-08-26 16:51:48 +05:00
parent 3315ac1df6
commit ff6b826e13

View File

@@ -1493,7 +1493,9 @@ async def handle_client(reader_clt, writer_clt):
async def handle_client_wrapper(reader, writer):
try:
await handle_client(reader, writer)
except (asyncio.IncompleteReadError, ConnectionResetError, TimeoutError):
except (asyncio.IncompleteReadError, asyncio.CancelledError):
pass
except (ConnectionResetError, TimeoutError):
pass
except Exception:
traceback.print_exc()