Fixed runtime's reconnecting loop not stopping when re-configuring WAMP.
authorEdouard Tisserant
Wed, 19 Dec 2018 10:53:19 +0100
changeset 2474 347b03f7e0e8
parent 2473 1d64d283d0bd
child 2475 39ba6a125a97
Fixed runtime's reconnecting loop not stopping when re-configuring WAMP.
In case WAMP was already trying to connect without success and user change WAMP configuration through web interface, previous ReconnectingClient wasn't stopped.
runtime/WampClient.py
--- a/runtime/WampClient.py	Wed Dec 19 10:48:53 2018 +0100
+++ b/runtime/WampClient.py	Wed Dec 19 10:53:19 2018 +0100
@@ -226,12 +226,9 @@
 
     with open(os.path.realpath(_WampConf), 'w') as f:
         json.dump(WampClientConf, f, sort_keys=True, indent=4)
+    StopReconnectWampClient()
     if 'active' in WampClientConf and WampClientConf['active']:
-        if _transportFactory and _WampSession:
-            StopReconnectWampClient()
         StartReconnectWampClient()
-    else:
-        StopReconnectWampClient()
 
     return WampClientConf