diff --git a/frappy/lib/asynconn.py b/frappy/lib/asynconn.py index cc448e81..e178ef2d 100644 --- a/frappy/lib/asynconn.py +++ b/frappy/lib/asynconn.py @@ -218,6 +218,8 @@ class AsynTcp(AsynConn): except (socket.timeout, TimeoutError): # timeout while waiting return b'' + except ConnectionResetError: + pass # treat equallly as a gracefully disconnected peer # note that when no data is sent on a connection, an interruption might # not be detected within a reasonable time. sending a heartbeat should # help in this case.