mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Only try to close the connection if we ever got connected.
This commit is contained in:
parent
39b83723a2
commit
4027d2a171
@ -57,6 +57,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
|||||||
self.irc = irc
|
self.irc = irc
|
||||||
drivers.ServersMixin.__init__(self, irc)
|
drivers.ServersMixin.__init__(self, irc)
|
||||||
drivers.IrcDriver.__init__(self) # Must come after setting irc.
|
drivers.IrcDriver.__init__(self) # Must come after setting irc.
|
||||||
|
self.conn = None
|
||||||
self.servers = ()
|
self.servers = ()
|
||||||
self.eagains = 0
|
self.eagains = 0
|
||||||
self.inbuffer = ''
|
self.inbuffer = ''
|
||||||
@ -180,7 +181,8 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
|||||||
|
|
||||||
def die(self):
|
def die(self):
|
||||||
drivers.log.die(self.irc)
|
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!
|
# self.irc.die() Kill off the ircs yourself, jerk!
|
||||||
|
|
||||||
def name(self):
|
def name(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user