Updated to make sure Relay doesn't break dying.

This commit is contained in:
Jeremy Fincher 2004-08-02 11:38:53 +00:00
parent cb1cd25995
commit a5e473bba2

View File

@ -721,6 +721,9 @@ class Irc(IrcCommandDispatcher):
if self in world.ircs: if self in world.ircs:
for cb in self.callbacks: for cb in self.callbacks:
cb.die() cb.die()
# If we shared our list of callbacks, this ensures that cb.die() is
# only called once for each callback.
self.callbacks[:] = []
world.ircs.remove(self) world.ircs.remove(self)
else: else:
log.warning('Irc object killed twice.') log.warning('Irc object killed twice.')