Only try to close the connection if we ever got connected.

This commit is contained in:
Jeremy Fincher 2004-08-21 07:06:52 +00:00
parent 39b83723a2
commit 4027d2a171

View File

@ -57,6 +57,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
self.irc = irc
drivers.ServersMixin.__init__(self, irc)
drivers.IrcDriver.__init__(self) # Must come after setting irc.
self.conn = None
self.servers = ()
self.eagains = 0
self.inbuffer = ''
@ -180,6 +181,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
def die(self):
drivers.log.die(self.irc)
if self.conn is not None:
self.conn.close()
# self.irc.die() Kill off the ircs yourself, jerk!