Beispiel #1
0
 def clientConnectionLost(self, connector, unused_reason):
     self.clientProxy.nodeLocator.remove(self.address)
     if hasattr(self, 'deferred') and not self.deferred.called:
         self.reactor.callLater(0, self.deferred.errback, unused_reason)
         del self.deferred
     ClientFactory.clientConnectionLost(
             self, connector, unused_reason)
Beispiel #2
0
 def clientConnectionLost(self, connector, reason):
     logger.info('lost connection: %s', reason.getErrorMessage())
     ClientFactory.clientConnectionLost(self, connector, reason)
     if self.reconnect:
         time.sleep(self.reconnect_delay)
         connector.connect()
     elif not self.protocols:
         if self.onFinish:
             self.onFinish.callback(None)
Beispiel #3
0
 def clientConnectionLost(self, connector, reason):
     logger.info('lost connection: %s', reason.getErrorMessage())
     ClientFactory.clientConnectionLost(self, connector, reason)
     if self.reconnect:
         time.sleep(self.reconnect_delay)
         connector.connect()
     elif not self.protocols:
         if self.onFinish:
             self.onFinish.callback(None)
Beispiel #4
0
    def clientConnectionLost(self, connector, reason):
        # Disable modules
        if connector.host in self.bot.moduleHandler.enabledModules:
            for module in self.bot.moduleHandler.enabledModules[connector.host]:
                self.bot.moduleHandler.disableModule(module, connector.host, True)

        self.bot.moduleHandler.runGenericAction("disconnect", connector.host)
        del self.bot.servers[connector.host]

        # Check whether or not we should reconnect
        if connector.host in self.currentlyDisconnecting:
            self.bot.log.info("Connection to {connector.host} was closed cleanly.", connector=connector)
            ClientFactory.clientConnectionLost(self, connector, reason)
            self.currentlyDisconnecting.remove(connector.host)
            self.bot.countConnections()
        else:
            ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
Beispiel #5
0
 def clientConnectionLost(self, p_connector, p_reason):
     LOG.warn('Lost connection.\n\tReason:{}'.format(p_reason))
     ClientFactory.clientConnectionLost(self, p_connector, p_reason)
Beispiel #6
0
 def clientConnectionLost(self, connector, reason):
     logger.debug("%s: BaseClient::clientConnectionLost(): %s",
                  self.protocol_name, reason)
     self.session = None
     return ClientFactory.clientConnectionLost(self, connector, reason)
Beispiel #7
0
 def clientConnectionLost(self, connector, reason):
     ClientFactory.clientConnectionLost(self, connector, reason)
Beispiel #8
0
 def clientConnectionFailed(self, connector, reason):
     log.msg('APNSFeedbackClientFactory clientConnectionFailed reason=%s' %
             reason)
     ClientFactory.clientConnectionLost(self, connector, reason)
Beispiel #9
0
 def clientConnectionLost(self, connector, reason):
     logger.info('lost connection: {}'.format(reason))
     ClientFactory.clientConnectionLost(self, connector, reason)
     if self.reconnect:
         reactor.callFromThread(time.sleep, self.reconnect_delay)
         connector.connect()
Beispiel #10
0
 def clientConnectionLost(self, connector, reason):
     ClientFactory.clientConnectionLost(self, connector, reason)
     logging.warn(u"ServerManager DOWN!!!")
     self.sm.onConnectionLost()
Beispiel #11
0
 def clientConnectionLost(self, connector, reason):
     ClientFactory.clientConnectionLost(self, connector, reason)
     logging.warn(u" LoginServer DOWN!!! reason:%s", reason)
     self.loginserver.onConnectionLost()
Beispiel #12
0
 def clientConnectionLost(self, connector, reason):
     if hasattr(connector.transport, "fullDisconnect") and connector.transport.fullDisconnect:
         ClientFactory.clientConnectionLost(self, connector, reason)
     else:
         ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
Beispiel #13
0
 def clientConnectionLost(self, connector, reason):
     log.msg("APNSFeedbackClientFactory clientConnectionLost reason=%s" % reason)
     ClientFactory.clientConnectionLost(self, connector, reason)
Beispiel #14
0
 def clientConnectionLost(self, connector, reason):
     ClientFactory.clientConnectionLost(self, connector, reason)
     logging.warn(u" Logingate DOWN!!!")
     self.logingate.onConnectionLost()
Beispiel #15
0
 def clientConnectionLost(self, connector, reason):
     log.msg('Lost connection.  Reason:', reason)
     ClientFactory.clientConnectionLost(self, connector, reason)
Beispiel #16
0
 def clientConnectionLost(self, connector, reason):
     ClientFactory.clientConnectionLost(self, connector, reason)
     del(self.connections[str(connector.host)])
Beispiel #17
0
 def clientConnectionFailed(self, connector, reason):
   log.msg('APNSFeedbackClientFactory clientConnectionFailed reason=%s' % reason)
   ClientFactory.clientConnectionLost(self, connector, reason)
Beispiel #18
0
 def clientConnectionLost(self, connector, reason):
     log.msg('Lost connection.  Reason:', reason)
     ClientFactory.clientConnectionLost(self, connector, reason)