From 4027d2a17111382d2e6db2cfb851c1db219d49d7 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 21 Aug 2004 07:06:52 +0000 Subject: [PATCH] Only try to close the connection if we ever got connected. --- src/socketDrivers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/socketDrivers.py b/src/socketDrivers.py index 2b5982806..272f28feb 100644 --- a/src/socketDrivers.py +++ b/src/socketDrivers.py @@ -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,7 +181,8 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): def die(self): drivers.log.die(self.irc) - self.conn.close() + if self.conn is not None: + self.conn.close() # self.irc.die() Kill off the ircs yourself, jerk! def name(self):