From 8b26cc843db0aa1674101df8ba9e20b5d42da98c Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Thu, 13 Feb 2020 14:22:32 +0500 Subject: [PATCH] catch IncompleteReadError while handling a bad client --- mtprotoproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 874708b..24a1f62 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -1013,7 +1013,7 @@ async def handle_bad_client(reader_clt, writer_clt, handshake): writer.write(data) await writer.drain() - except OSError: + except (OSError, asyncio.IncompleteReadError) as e: pass writer_srv = None