コード例 #1
0
ファイル: plugin.py プロジェクト: OpenVuPlus/dvbapp-plugin
	def clientConnectionFailed(self, connector, reason):
		global ncidsrv
		if config.plugins.NcidClient.connectionVerbose.value:
			Notifications.AddNotification(MessageBox, _("Connecting to NCID Server failed\n (%s)\nretrying...") % reason.getErrorMessage(), type=MessageBox.TYPE_INFO, timeout=config.plugins.NcidClient.timeout.value)
		ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
		# config.plugins.NcidClient.enable.value = False
		ncidsrv = None
コード例 #2
0
ファイル: chat.py プロジェクト: m-messiah/ROT
 def clientConnectionFailed(self, connector, reason):
     """Connection failed
     """
     print 'Connection failed. Reason:', reason
     ReconnectingClientFactory.clientConnectionFailed(self,
                                                      connector,
                                                      reason)
コード例 #3
0
 def clientConnectionFailed(self, connector, reason):
     """
     Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method
     """
     if self.debug:
         print('IPAFactory connection failed:', reason.getErrorMessage())
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #4
0
ファイル: subscriber.py プロジェクト: jdswinbank/Comet
 def clientConnectionFailed(self, connector, reason):
     log.info(
         "Connection to %s failed; will retry in %d second%s"
         % (connector.getDestination(), self.delay, "" if self.delay == 1 else "s"),
         system="VOEventSubscriberFactory",
     )
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #5
0
ファイル: client.py プロジェクト: p0is0n/txsphinx
	def clientConnectionFailed(self, connector, reason):
		"""
		Notify the pool that we're unable to connect
		"""
		if self.protocolInstance is not None:
			if self.protocolInstance._lastreq and ((time() - self.protocolInstance._lastreq) >= 100):
				self.stopTrying()

		if self.continueTrying:
			ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)

			# pool pendings
			self.pool.addPendings(self)
		else:
			if DEBUG:
				log.msg('Sphinx factory stop', self)

			if self.deferred:
				self.deferred.errback(reason)

				# Clean deferred
				self.deferred = None
			else:
				# pool pendings
				self.pool.delPendings(self)

		if self.protocolInstance is not None:
			self.pool.clientGone(self.protocolInstance)

		# Clean
		self.protocolInstance = None
コード例 #6
0
ファイル: client.py プロジェクト: Cue/graphite
 def clientConnectionFailed(self, connector, reason):
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
     log.clients(
         "%s::clientConnectionFailed (%s:%d) %s" % (self, connector.host, connector.port, reason.getErrorMessage())
     )
     self.connectFailed.callback(dict(connector=connector, reason=reason))
     self.connectFailed = Deferred()
コード例 #7
0
    def clientConnectionFailed(self, connector, reason):

        self.logger.warn('CmdrConnection failed: %s ' % (reason))

        self.activeConnection = None
        self.stateCallback(self)
        ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #8
0
ファイル: dropper.py プロジェクト: timzchang/Parachutes
	def clientConnectionFailed(self, connector, reason):
		"""
		ParaConnFactory.clientConnectionFailed: function that is called when the 
		connectTCP fails to reach the host. Taken from the internet, this function 
		will periodically attempt to connect until the connection is successful.
		"""
		ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #9
0
ファイル: tgsClient.py プロジェクト: Watzmann/TGSBot
 def clientConnectionFailed(self, connector, reason):
     log.msg("Connection failed. Reason: %s" % reason, logLevel=INFO)
     if getattr(self, "restart", True):
         self.reset_protocol_for_login()
         ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
     else:
         log.msg("Done - no restart", logLevel=INFO)
         reactor.callWhenRunning(reactor.stop)
コード例 #10
0
ファイル: ftpclient.py プロジェクト: frellwan/SciFy-Pi
    def clientConnectionFailed(self, connector, reason):
        """ *******************************************************
        Called when a connection has failed to connect

        @type reason: L{twisted.python.fialure.Failure}
        ******************************************************* """
        print 'Connection fialed. Reason:', reason
        ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #11
0
 def clientConnectionFailed(self, connector, reason):
     logging.debug('Connection failed to Envisalink. Reason: %s', str(reason))
     if hasattr(self, "_currentLoopingCall"):
         try:
             self._currentLoopingCall.stop()
         except:
             logging.error("Error trying to stop looping call, ignoring...")
     ReconnectingClientFactory.clientConnectionFailed(self, connector,
                                                      reason)
コード例 #12
0
ファイル: subscriber.py プロジェクト: timstaley/Comet
 def clientConnectionLost(self, connector, reason):
     log.info(
         "Connection to %s lost; will retry in %d second%s" %
         (connector.getDestination(), self.delay, "" if self.delay == 1 else "s"),
         system="VOEventSubscriberFactory"
     )
     if self.reset_call.active():
         self.reset_call.cancel()
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #13
0
    def clientConnectionFailed(self, connector, reason):
        """
        self.CONNECTION_INFO ok
        """
        self.continueTrying = None

        log.msg('Connection failed. Reason: ', reason)
        ReconnectingClientFactory.clientConnectionFailed(self,\
         connector, reason)
コード例 #14
0
    def clientConnectionFailed(self, connector, reason):
        """
        Called when the connection to the server failed.
        """
        ReconnectingClientFactory.clientConnectionFailed(
            self, connector, reason)

        if 'OpenSSL.SSL.Error' in str(reason):
            self.network.exit_code = 3
            self.network.stop()
コード例 #15
0
ファイル: client.py プロジェクト: shrick/ncidmon
 def clientConnectionFailed(self, connector, reason):
     self._failures += 1
     dprint('connection failed ({}): {}'.format(
         self._failures, reason. getErrorMessage()))
     
     if self._listen or self._failures < 4:
         ReconnectingClientFactory.clientConnectionFailed(
             self, connector, reason)
     else:
         self.reactor.stop()
コード例 #16
0
ファイル: service.py プロジェクト: ant1fr/LISA-CLIENT-Linux
    def clientConnectionFailed(self, connector, reason):
        # Warn on first failure
        if self.first_time == True:
            Speaker.speak("no_server")
            self.first_time = False

        # Retry
        self.resetDelay()
        log.err("Connection failed. Reason:", reason.getErrorMessage())
        ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #17
0
ファイル: client.py プロジェクト: drawks/carbon
  def clientConnectionFailed(self, connector, reason):
    ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
    log.clients("%s::clientConnectionFailed (%s:%d) %s" % (
        self, connector.host, connector.port, reason.getErrorMessage()))

    self.destinationDown(connector.factory.destination)

    args = dict(connector=connector, reason=reason)
    d = self.connectFailed
    self.connectFailed = Deferred()
    d.callback(args)
コード例 #18
0
ファイル: pool.py プロジェクト: rlotun/txconnpool
    def clientConnectionFailed(self, connector, reason):
        """
        Notify the connectionPool that we're unable to connect
        """
        if self._protocolInstance is not None:
            self.connectionPool.clientBusy(self._protocolInstance)

        ReconnectingClientFactory.clientConnectionFailed(
            self,
            connector,
            reason)
コード例 #19
0
    def clientConnectionFailed(self, connector, reason):
        """
        Notify the connectionPool that we're unable to connect
        """
        self.log.error("MemCache connection failed: %s" % (reason,))
        if self._protocolInstance is not None:
            self.connectionPool.clientBusy(self._protocolInstance)

        ReconnectingClientFactory.clientConnectionFailed(
            self,
            connector,
            reason)
コード例 #20
0
    def clientConnectionFailed(self, connector, reason):
        """ Override client connection failed method
        Called when
        @param connector:
        @param reason:
        @return:
        """
        if self.CONNECTION_INFO['reconnection'] == 'yes':
            self.continueTrying = True
        elif self.CONNECTION_INFO['reconnection'] == 'no':
            self.continueTrying = None

        log.msg('Connection failed. Reason: ', reason)
        ReconnectingClientFactory.clientConnectionFailed(self,
                                                         connector,
                                                         reason)
コード例 #21
0
ファイル: brokerclient.py プロジェクト: joshainglis/afkak
    def clientConnectionFailed(self, connector, reason):
        """Handle notification from the lower layers of connection failure.

        If we are shutting down, and twisted sends us the expected type of
        error, eat the error. Otherwise, log it and pass it along.
        Also, schedule notification of our subscribers at the next pass
        through the reactor.
        """
        if self.dDown and reason.check(UserError):
            # We initiated the close, this is an expected connectionFailed,
            # given we were trying to connect when close() was called
            log.debug('%r: clientConnectionFailed:%r:%r', self, connector,
                      reason)
            notifyReason = None  # Not a failure
        else:
            log.error('%r: clientConnectionFailed:%r:%r', self, connector,
                      reason)
            notifyReason = reason

        # Reset our proto so we don't try to send to a down connection
        # Needed?  I'm not sure we should even _have_ a proto at this point...
        self.proto = None

        # Schedule notification of subscribers
        self._get_clock().callLater(0, self._notify, False, notifyReason)
        # Call our superclass's method to handle reconnecting
        return ReconnectingClientFactory.clientConnectionFailed(
            self, connector, reason)
コード例 #22
0
    def test_deserializationResetsParameters(self):
        """
        A L{ReconnectingClientFactory} which is unpickled does not have an
        L{IConnector} and has its reconnecting timing parameters reset to their
        initial values.
        """
        factory = ReconnectingClientFactory()
        factory.clientConnectionFailed(FakeConnector(), None)
        self.addCleanup(factory.stopTrying)

        serialized = pickle.dumps(factory)
        unserialized = pickle.loads(serialized)
        self.assertIsNone(unserialized.connector)
        self.assertIsNone(unserialized._callID)
        self.assertEqual(unserialized.retries, 0)
        self.assertEqual(unserialized.delay, factory.initialDelay)
        self.assertTrue(unserialized.continueTrying)
コード例 #23
0
    def test_deserializationResetsParameters(self):
        """
        A L{ReconnectingClientFactory} which is unpickled does not have an
        L{IConnector} and has its reconnecting timing parameters reset to their
        initial values.
        """
        factory = ReconnectingClientFactory()
        factory.clientConnectionFailed(FakeConnector(), None)
        self.addCleanup(factory.stopTrying)

        serialized = pickle.dumps(factory)
        unserialized = pickle.loads(serialized)
        self.assertEqual(unserialized.connector, None)
        self.assertEqual(unserialized._callID, None)
        self.assertEqual(unserialized.retries, 0)
        self.assertEqual(unserialized.delay, factory.initialDelay)
        self.assertEqual(unserialized.continueTrying, True)
コード例 #24
0
ファイル: smtp.py プロジェクト: p0is0n/mail-services
    def clientConnectionFailed(self, connector, reason):
        """
        Notify the pool that we're unable to connect
        """
        self.errors += 1

        # Stop
        if self.errors >= self.errorsLimit:
            self.stopTrying()

        if self.continueTrying:
            if self.protocolInstance is not None:
                if self.protocolInstance._lastreq and ((time() - self.protocolInstance._lastreq) >= 100):
                    self.stopTrying()

        if self.continueTrying:
            ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)

            # pool pendings
            self.pool.addPendings(self)
        else:
            if self.deferred:
                if self.protocolError is not None:
                    self.deferred.errback(self.protocolError)
                else:
                    self.deferred.errback(reason)

                # Clean deferred
                self.deferred = None
            else:
                # pool pendings
                self.pool.delPendings(self)

        if self.protocolInstance is not None:
            self.pool.clientGone(self.protocolInstance)

        # Clean
        self.protocolInstance = None
        self.protocolError = None
コード例 #25
0
ファイル: protocol.py プロジェクト: Muralidhar/Telephus
 def clientConnectionFailed(self, connector, reason):
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
     self._errback(reason)
コード例 #26
0
ファイル: tcpclient.py プロジェクト: wicenvra/DMRmonitor
 def clientConnectionFailed(self, connector, reason):
     logging.info('Connection failed. Reason: %s', reason)
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #27
0
 def clientConnectionFailed(self, connector, reason):
     self.log.error("Unable to connect to APN server: %s" % (reason, ))
     self.connected = False
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #28
0
ファイル: factory.py プロジェクト: srynot4sale/TwistedBot
 def clientConnectionFailed(self, connector, reason):
     log.msg('Connection failed, reason:', reason.getErrorMessage())
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #29
0
 def clientConnectionFailed(self, connector, r):
     drivers.log.connectError(self.currentServer, errorMsg(r))
     (connector.host, connector.port) = self._getNextServer()
     ReconnectingClientFactory.clientConnectionFailed(self, connector, r)
コード例 #30
0
 def clientConnectionFailed(self, connector, reason):
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #31
0
ファイル: twbackend.py プロジェクト: sssst315/beah
 def clientConnectionFailed(self, connector, reason):
     self.linfo('Connection to beah backend on %s failed: %s', connector.getDestination(), reason)
     self.backend.set_controller()
     if not self._done:
         ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #32
0
 def clientConnectionFailed(self, connector, reason):
     logging.error( 'IntraFace - IntrafaceClient Connection failed.  Reason: %s' % (reason) )
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #33
0
ファイル: client.py プロジェクト: likebeta/txMySQL
 def clientConnectionFailed(self, connector, reason):
     if DEBUG:
         print "Got clientConnectionFailed for reason %s" % str(reason)
     self._handleConnectionError(reason, is_failed=True)
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #34
0
ファイル: receiver.py プロジェクト: fagan2888/Bigfish
 def clientConnectionFailed(self, connector, reason):
     self.logger.error('connection failed:', reason.getErrorMessage())
     self.done.errback(reason)
     ReconnectingClientFactory.clientConnectionFailed(connector, reason)
コード例 #35
0
ファイル: client.py プロジェクト: trb116/pythonanalyzer
 def clientConnectionFailed(self, conector, reason):
     if isinstance(reason, ConnectionLost):
         log.error('Connection failed: {}'.format(reason))
         ReconnectingClientFactory.clientConnectionFailed(
             self, conector, reason)
コード例 #36
0
 def clientConnectionFailed(self, connector, reason):
     self.listener.connectionLost('clientConnectionFailed %s' %
                                  (str(reason)))
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #37
0
 def clientConnectionFailed(self, connector, reason):
     logger.error("Failed to connect to replication: %r", reason)
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #38
0
ファイル: cameractrl.py プロジェクト: mrdanbrooks/cameractrl
 def clientConnectionFailed(self, connector, reason):
     log("Connection failed, reason: %s" % reason.getErrorMessage(), syslog.LOG_WARNING)
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #39
0
 def clientConnectionFailed(self, connector, reason):
     self.logger.error("Connection with the broker failed: %s" % reason)
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #40
0
ファイル: cli.py プロジェクト: resula9/wifibroadcast
 def clientConnectionFailed(self, connector, reason):
     log.msg('Connection failed: %s' % (reason.value,))
     self.window.clear()
     self.window.addstr(0, 0, 'Connection failed: %s' % (reason.value,))
     self.window.refresh()
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #41
0
 def clientConnectionFailed(self, connector, reason):
     log.msg('RabbitMQ connection failed. Reason:', reason)
     self.handler.channel = None
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #42
0
ファイル: dismass_client.py プロジェクト: jaciyu/DisMass-8.5
 def clientConnectionFailed(self, connector, reason):
     print 'Connection failed:', reason.getErrorMessage()
     # Try to reconnect
     print 'Trying toe reconnect. Please wait...'
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #43
0
 def clientConnectionFailed(self, connector, reason):
     if self.is_reconnecting:
         log.debug(reason)
         ReconnectingClientFactory.clientConnectionFailed(
             self, connector, reason)
コード例 #44
0
ファイル: MMPProtocol.py プロジェクト: lachesis/phoenix-miner
    def clientConnectionFailed(self, connector, reason):
        self.runCallback('failure')

        return ReconnectingClientFactory.clientConnectionFailed(
            self, connector, reason)
コード例 #45
0
 def clientConnectionFailed(self, connector, reason):
     self.connectFailed.emit("Connect failed")
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #46
0
 def clientConnectionFailed(self, connector, reason):
     print('Connection failed. Reason:', reason)
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #47
0
ファイル: client.py プロジェクト: katzj/graphite
 def clientConnectionFailed(self, connector, reason):
   ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
   log.aggregator("connection attempt to %s failed: %s" % (self.remoteAddr, reason.value))
コード例 #48
0
 def clientConnectionFailed(self, connector, reason):
     logging.error("Failed connection to IRC server: %s", reason)
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #49
0
 def clientConnectionFailed(self, connector, reason):
     logger.debug('Connection failed. Reason {reason!r}:', reason=reason)
     ReconnectingClientFactory.clientConnectionFailed(self, connector,
                                                      reason)
コード例 #50
0
 def clientConnectionFailed(self, connector, reason):
     print 'Lost reason. Reason: ', reason
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #51
0
ファイル: Networking.py プロジェクト: ismail-s/ishyChat
 def clientConnectionFailed(self, connector, reason):
     self.app.addString(Messages.conn_failed)
     self.state = Const.STATE_NOT_CONNECTED
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #52
0
	def clientConnectionLost(self, connector, reason):
		print 'Lost connection!\n'
		#print 'Reason: %s' % reason 
		ReconnectingClientFactory.clientConnectionFailed(
				self, connector, reason) 
		self.netMgr.quit = True
コード例 #53
0
 def clientConnectionFailed(self, connector, reason):
     dlog("Connect attempt failed:", reason.getErrorMessage())
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #54
0
 def clientConnectionFailed(self, connector, reason):
     LOGGER.debug('Connection failed. Reason: %s', reason)
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
     self._proto = None
コード例 #55
0
 def clientConnectionFailed(self, connector, reason):
     logging.error("Connection failed: %r", reason)
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #56
0
 def clientConnectionFailed(self, connector, reason):
     self.listener.connectionLost('clientConnectionFailed %s' %
         (str(reason)))
     ReconnectingClientFactory.clientConnectionFailed(self,
         connector, reason)
コード例 #57
0
 def clientConnectionFailed(self, connector, reason):
     """Connection failed
     """
     print 'Connection failed. Reason:', reason
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)
コード例 #58
0
 def clientConnectionFailed(self, connector, reason):
     log.err("Failed to connect to realtime server at %s: %s" % (connector.getDestination().host, reason))
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
コード例 #59
0
ファイル: read_status.py プロジェクト: mattalvarado/ARMR_Bot
	def clientConnectionFailed(self, connector, reason):
		print "Connection failed. Reason:", reason
		ReconnectingClientFactory.clientConnectionFailed(self, connector,reason)
コード例 #60
0
 def clientConnectionFailed(self, connector, reason):
     log.error('Telnet connection failed. Reason:%s ' % reason)
     ReconnectingClientFactory.clientConnectionFailed(
         self, connector, reason)