From d9a353e50502f4cee0c4242def31706430bb39bf Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 1 Jan 2019 21:30:55 +0000 Subject: [PATCH] Drain buffer after read --- tcp_nat_proxy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tcp_nat_proxy.py b/tcp_nat_proxy.py index 50d09ff..fbd3c8d 100644 --- a/tcp_nat_proxy.py +++ b/tcp_nat_proxy.py @@ -26,6 +26,7 @@ async def pipe(reader, writer): try: while not reader.at_eof(): writer.write(await reader.read(BUFFER_SIZE)) + await writer.drain() finally: writer.close()