def clientConnectionFailed(self, connector, reason): self.clientProxy.nodeLocator.remove(self.address) if hasattr(self, 'deferred') and not self.deferred.called: self.reactor.callLater(0, self.deferred.errback, reason) del self.deferred ClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.log.error( "Unable to connect to APN feedback server: {reason}", reason=reason, ) self.connected = False ClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): logger.info('connection failed: %s', reason.getErrorMessage()) ClientFactory.clientConnectionFailed(self, connector, reason) if self.reconnect: time.sleep(self.reconnect_delay) connector.connect() elif not self.protocols: if self.onFinish: self.onFinish.callback(None)
def clientConnectionFailed(self, connector, reason): logger.info('connection failed: {}'.format(reason)) ClientFactory.clientConnectionFailed(self, connector, reason) if self.reconnect: reactor.callFromThread(time.sleep, self.reconnect_delay) connector.connect() else: if self.standalone: try: reactor.callFromThread(reactor.stop) except ReactorNotRunning: pass
def clientConnectionFailed(self, connector, reason): logging.info('Connection failed') ClientFactory.clientConnectionFailed(self, connector, reason) #If first connection was failed - try to start server if not self.reconnect: #Start, reconnect try: subprocess.Popen(['python', 'server.py']).wait() except Exception, err: logging.exception('Error starting server: %s', err) time.sleep(3) do_connect(self.listener, True)
def connect(self, host, port): self._connection_timeout = self.timeout self._stack_conn = _Connection() self._stack_conn.attach(self) self._stack_conn.connect_cb = Callback() factory = ClientFactory() factory.protocol = lambda: self._stack_conn factory.clientConnectionFailed = self.clientConnectionFailed self._connect_to_reactor(host, port, factory, self._connection_timeout) yield self._stack_conn.connect_cb
def connect(self, host, port): self._stack_conn = _Connection() self._stack_conn.attach(self) self._stack_conn.connect_cb = Callback() factory = ClientFactory() factory.protocol = lambda: self._stack_conn factory.clientConnectionFailed = self.clientConnectionFailed if self.ssl_options is not None: reactor.connectSSL(host, port, factory, SSLContextFactory(self.ssl_options)) else: reactor.connectTCP(host, port, factory) yield self._stack_conn.connect_cb
def getYobotPurpleFactory(self): f = ClientFactory() f.protocol = YobotPurple f.setPurple = self.setPurple f.doRegister = self.purpleDoRegister f.dispatch = self.purple_dispatch #... f.attempts = 0 max_attempts = 5 def clientConnectionFailed(connector, reason): log_err("Attempt %d/%d failed: %s" % (f.attempts, max_attempts, reason)) if f.attempts < max_attempts: log_info("trying again in 1.5 secs") reactor.callLater(1.5, connector.connect) f.attempts += 1 f.clientConnectionFailed = clientConnectionFailed return f
def clientConnectionFailed(self, connector, reason): log.err(reason, 'Connection failed') ClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, p_connector, p_reason): LOG.error('Connection failed.\n\tReason:{}'.format(p_reason)) ClientFactory.clientConnectionFailed(self, p_connector, p_reason)
def clientConnectionFailed(self, connector, reason): """ """ print 'client connection failed' ClientFactory.clientConnectionFailed(self, connector, reason) self.controller.completed.errback(reason)
def clientConnectionFailed(self, connector, reason): logger.debug("%s: BaseClient::clientConnectionFailed(): %s", self.protocol_name, reason) self.session = None return ClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): ClientFactory.clientConnectionFailed(self, connector, reason) e = Event('connection-result', succeeded = False, reason = reason) self.event_func(e)
def clientConnectionFailed(self, connector, reason): self.log_error("Unable to connect to APN feedback server: %s" % (reason,)) self.connected = False ClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): ClientFactory.clientConnectionFailed(self, connector, reason) logging.warn(u" LoginServer connect FAIL!!!") self.loginserver.connectionFail()
def clientConnectionFailed(self, connector, reason): print "serverConnectionFailed", reason ClientFactory.clientConnectionFailed(self, connector, reason) self.controller.completed.errback(reason)
def clientConnectionFailed(self, connector, reason): ClientFactory.clientConnectionFailed(self, connector, reason) logging.warn(u"ServerManager connect FAIL!!!") self.sm.connectionFail()
def clientConnectionFailed(self, connector, reason): """ """ ClientFactory.clientConnectionFailed(self, connector, reason) self.controller.completed.errback(reason)
def clientConnectionFailed(self, connector, reason): ClientFactory.clientConnectionFailed(self, connector, reason)