I use ReconnectingClientFactory for implementing client with reconnection feature.
# ... class ClientProtocol(Protocol): def __init__(self, factory): self.factory = factory # ... class ClientFactory(ReconnectingClientFactory): def buildProtocol(self, addr): self.resetDelay() return ClientProtocol(self) def clientConnectionFailed(self, connector, reason): ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) def clientConnectionLost(self, connector, reason): ReconnectingClientFactory.clientConnectionLost(self, connector, reason) # ... It works, but reconnect delay exponentially grows after fail. What's the best way to have two seconds delay?