From 3fd0334fbeaca821e67f9b0498c7bf9348483034 Mon Sep 17 00:00:00 2001 From: TheKysek Date: Sun, 16 Oct 2016 13:01:41 +0200 Subject: [PATCH] Catch more exceptions, resolves: #5, #6, #8 --- src/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.py b/src/connection.py index 3c13142..aa93e5d 100644 --- a/src/connection.py +++ b/src/connection.py @@ -129,7 +129,7 @@ class Connection(threading.Thread): self.buffer_send = self.buffer_send[amount:] except (BlockingIOError, ssl.SSLWantWriteError): pass - except BrokenPipeError as e: + except (BrokenPipeError, ConnectionResetError, ssl.SSLError) as e: logging.debug('Disconnecting from {}:{}. Reason: {}'.format(self.host, self.port, e)) self.status = 'disconnecting'