mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-21 16:10:39 +01:00
Elucidating comment, XXX, and hopefully a fix for the problems with using Network.disconnect while a socketDriver is reconnecting.
This commit is contained in:
parent
9f612df8d9
commit
f63fa6846f
@ -920,7 +920,7 @@ class Irc(IrcCommandDispatcher):
|
|||||||
if not self.zombie:
|
if not self.zombie:
|
||||||
if msg.args[0].startswith('Closing Link'):
|
if msg.args[0].startswith('Closing Link'):
|
||||||
self.driver.reconnect()
|
self.driver.reconnect()
|
||||||
elif 'too fast' in msg.args[0]:
|
elif 'too fast' in msg.args[0]: # Connecting too fast.
|
||||||
self.driver.reconnect(wait=True)
|
self.driver.reconnect(wait=True)
|
||||||
|
|
||||||
def doNick(self, msg):
|
def doNick(self, msg):
|
||||||
@ -951,6 +951,11 @@ class Irc(IrcCommandDispatcher):
|
|||||||
def _reallyDie(self):
|
def _reallyDie(self):
|
||||||
"""Makes the Irc object die. Dead."""
|
"""Makes the Irc object die. Dead."""
|
||||||
log.info('Irc object for %s dying.' % self.network)
|
log.info('Irc object for %s dying.' % self.network)
|
||||||
|
# XXX This hasattr should be removed, I'm just putting it here because
|
||||||
|
# we're so close to a release. After 0.80.0 we should remove this
|
||||||
|
# and fix whatever AttributeErrors arise in the drivers themselves.
|
||||||
|
if self.driver is not None and hasattr(self.driver, 'die'):
|
||||||
|
self.driver.die()
|
||||||
if self in world.ircs:
|
if self in world.ircs:
|
||||||
world.ircs.remove(self)
|
world.ircs.remove(self)
|
||||||
# Only kill the callbacks if we're the last Irc.
|
# Only kill the callbacks if we're the last Irc.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user