runtime/WampClient.py
changeset 1891 66043243c246
parent 1890 916099cb8d22
child 1892 daf40a1e7607
equal deleted inserted replaced
1890:916099cb8d22 1891:66043243c246
    88         print(_('WAMP session left'))
    88         print(_('WAMP session left'))
    89 
    89 
    90 
    90 
    91 class ReconnectingWampWebSocketClientFactory(WampWebSocketClientFactory, ReconnectingClientFactory):
    91 class ReconnectingWampWebSocketClientFactory(WampWebSocketClientFactory, ReconnectingClientFactory):
    92     def clientConnectionFailed(self, connector, reason):
    92     def clientConnectionFailed(self, connector, reason):
    93         self.retry(connector)
       
    94         print(_("WAMP Client connection failed .. retrying .."))
    93         print(_("WAMP Client connection failed .. retrying .."))
       
    94         ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
    95 
    95 
    96     def clientConnectionLost(self, connector, reason):
    96     def clientConnectionLost(self, connector, reason):
    97         self.retry(connector)
       
    98         print(_("WAMP Client connection lost .. retrying .."))
    97         print(_("WAMP Client connection lost .. retrying .."))
       
    98         ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
    99 
    99 
   100 
   100 
   101 def LoadWampClientConf(wampconf):
   101 def LoadWampClientConf(wampconf):
   102 
   102 
   103     WSClientConf = json.load(open(wampconf))
   103     WSClientConf = json.load(open(wampconf))