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