code: def stopTrying(self):
          
          protocol.ReconnectingClientFactory.stopTrying(self)
          if not self._client_ready.called:
              self._client_ready.errback(
                  pika.exceptions.AMQPConnectionError(
                      u"Could not connect, reconnection cancelled."
                  )
              )
docs: Stop trying to reconnect to the broker.
  
          See the documentation of
          `twisted.internet.protocol.ReconnectingClientFactory` for details.