def connectionLost(self, *args): # Don't leave the reactor in an unclean state when we exit. self.setTimeout(None) return EventHandler.connectionLost(self, *args)