#2486 Reset delay function added. It resets the delay and the retry counter on reconnect. #2486
authordporopat <denis.poropat@smarteh.si>
Mon, 19 Mar 2018 12:18:07 +0100
branch#2486
changeset 2193 259df9ecf9ca
parent 1958 67f0d7ff7d3e
child 2194 35d6b9321ffd
#2486 Reset delay function added. It resets the delay and the retry counter on reconnect.
runtime/WampClient.py
--- a/runtime/WampClient.py	Wed Feb 28 16:10:05 2018 +0100
+++ b/runtime/WampClient.py	Mon Mar 19 12:18:07 2018 +0100
@@ -109,6 +109,10 @@
 
 
 class ReconnectingWampWebSocketClientFactory(WampWebSocketClientFactory, ReconnectingClientFactory):
+    def buildProtocol(self, addr):
+        self.resetDelay()
+        return ReconnectingClientFactory.buildProtocol(self, addr)
+
     def clientConnectionFailed(self, connector, reason):
         print(_("WAMP Client connection failed (%s) .. retrying .." % time.ctime()))
         ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)