runtime/WampClient.py
branchnevow_service_rework
changeset 2215 f808ec7dc10e
parent 2212 cf1718962567
child 2218 7a4deed94eb2
equal deleted inserted replaced
2214:b9cdbcc992d5 2215:f808ec7dc10e
   142         self.resetDelay()
   142         self.resetDelay()
   143         return ReconnectingClientFactory.buildProtocol(self, addr)
   143         return ReconnectingClientFactory.buildProtocol(self, addr)
   144 
   144 
   145     def clientConnectionFailed(self, connector, reason):
   145     def clientConnectionFailed(self, connector, reason):
   146         if self.continueTrying:
   146         if self.continueTrying:
   147             print(_("WAMP Client connection failed (%s) .. retrying .." % time.ctime()))
   147             print(_("WAMP Client connection failed (%s) .. retrying ..") % time.ctime())
   148             super(ReconnectingWampWebSocketClientFactory, self).clientConnectionFailed(connector, reason)
   148             super(ReconnectingWampWebSocketClientFactory, self).clientConnectionFailed(connector, reason)
   149         else:
   149         else:
   150             del connector
   150             del connector
   151 
   151 
   152     def clientConnectionLost(self, connector, reason):
   152     def clientConnectionLost(self, connector, reason):
   153         if self.continueTrying:
   153         if self.continueTrying:
   154             print(_("WAMP Client connection lost (%s) .. retrying .." % time.ctime()))
   154             print(_("WAMP Client connection lost (%s) .. retrying ..") % time.ctime())
   155             super(ReconnectingWampWebSocketClientFactory, self).clientConnectionFailed(connector, reason)
   155             super(ReconnectingWampWebSocketClientFactory, self).clientConnectionFailed(connector, reason)
   156         else:
   156         else:
   157             del connector
   157             del connector
   158 
   158 
   159 
   159