Fix 'Transport endpoint not connected' errors. Closes GH-437.

This commit is contained in:
Valentin Lorentz 2013-01-31 16:47:17 +01:00
parent fecb010dac
commit 7588472f36

View File

@ -243,7 +243,10 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
drivers.log.reconnect(self.irc.network)
if self in self._instances:
self._instances.remove(self)
try:
self.conn.shutdown(socket.SHUT_RDWR)
except: # "Transport endpoint not connected"
pass
self.conn.close()
self.connected = False
if reset: