Catch more exceptions, resolves: #5, #6, #8

This commit is contained in:
TheKysek 2016-10-16 13:01:41 +02:00
parent 0e8f8bd85e
commit 3fd0334fbe
1 changed files with 1 additions and 1 deletions

View File

@ -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'