mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05: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."""
|
||||
log.info('Irc object for %s dying.' % self.server)
|
||||
if self in world.ircs:
|
||||
for callback in self.callbacks:
|
||||
callback.die()
|
||||
for cb in self.callbacks:
|
||||
try:
|
||||
cb.die()
|
||||
except Exception, e:
|
||||
log.exception('Uncaught exception in %s.die:', cb.name())
|
||||
world.ircs.remove(self)
|
||||
else:
|
||||
log.warning('Irc object killed twice.')
|
||||
|
Loading…
Reference in New Issue
Block a user