Remove NOOP calls to reverse(), and *actually* call handlers in reverse order

This commit is contained in:
junglecow 2006-11-16 21:05:21 +00:00
parent 9475464907
commit e3f1626674
1 changed files with 1 additions and 3 deletions

View File

@ -74,10 +74,8 @@ class NBCommonClient(CommonClient):
''' Called on disconnection. Calls disconnect handlers and cleans things up. ''' ''' Called on disconnection. Calls disconnect handlers and cleans things up. '''
self.connected='' self.connected=''
self.DEBUG(self.DBG,'Disconnect detected','stop') self.DEBUG(self.DBG,'Disconnect detected','stop')
self.disconnect_handlers.reverse() for i in self.disconnect_handlers.reverse():
for i in self.disconnect_handlers:
i() i()
self.disconnect_handlers.reverse()
if self.__dict__.has_key('NonBlockingRoster'): if self.__dict__.has_key('NonBlockingRoster'):
self.NonBlockingRoster.PlugOut() self.NonBlockingRoster.PlugOut()
if self.__dict__.has_key('NonBlockingBind'): if self.__dict__.has_key('NonBlockingBind'):