Handle OSError exception during data sending

This commit is contained in:
TheKysek 2017-08-21 11:21:45 +02:00
parent f74cb829fc
commit 6a78dd0490
No known key found for this signature in database
GPG Key ID: 50D9AF00D0B1C497

View File

@ -144,7 +144,7 @@ class Connection(threading.Thread):
self.buffer_send = self.buffer_send[amount:]
except (BlockingIOError, ssl.SSLWantWriteError):
pass
except (BrokenPipeError, ConnectionResetError, ssl.SSLError) as e:
except (BrokenPipeError, ConnectionResetError, ssl.SSLError, OSError) as e:
logging.debug('Disconnecting from {}:{}. Reason: {}'.format(self.host_print, self.port, e))
self.status = 'disconnecting'