mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Catch exceptions in dying callbacks so all callbacks get a chance to die.
This commit is contained in:
parent
393a5b48f3
commit
717ee92e41
@ -667,8 +667,11 @@ class Irc(IrcCommandDispatcher):
|
|||||||
"""Makes the Irc object die. Dead."""
|
"""Makes the Irc object die. Dead."""
|
||||||
log.info('Irc object for %s dying.' % self.server)
|
log.info('Irc object for %s dying.' % self.server)
|
||||||
if self in world.ircs:
|
if self in world.ircs:
|
||||||
for callback in self.callbacks:
|
for cb in self.callbacks:
|
||||||
callback.die()
|
try:
|
||||||
|
cb.die()
|
||||||
|
except Exception, e:
|
||||||
|
log.exception('Uncaught exception in %s.die:', cb.name())
|
||||||
world.ircs.remove(self)
|
world.ircs.remove(self)
|
||||||
else:
|
else:
|
||||||
log.warning('Irc object killed twice.')
|
log.warning('Irc object killed twice.')
|
||||||
|
Loading…
Reference in New Issue
Block a user