code: def clientConnectionLost(self, connector, reason):
          
          if not isinstance(reason.value, error.ConnectionDone):
              _legacy_twisted_log.msg(
                  "Lost connection to the AMQP broker ({reason})",
                  reason=reason.value,
                  logLevel=logging.WARNING,
              )
          if self._client_ready.called:
              # Renew the ready deferred, it will callback when the
              # next connection is ready.
              self._client_ready = defer.Deferred()
          protocol.ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
docs: Called when the connection to the broker has been lost.
  
          See the documentation of
          `twisted.internet.protocol.ReconnectingClientFactory` for details.