def _connectionLost(self, reason):
        """Called when the protocol connection is lost

        - Log the disconnection.
        - Mark any outstanding requests as unsent so they will be sent when
          a new connection is made.
        - If closing the broker client, mark completion of that process.

        :param reason:
            Failure that indicates the reason for disconnection.
        """
        log.info('%r: Connection closed: %r', self, reason)

        # Reset our proto so we don't try to send to a down connection
        self.proto = None

        # Mark any in-flight requests as unsent.
        for tReq in self.requests.values():
            tReq.sent = False

        if self._dDown:
            self._dDown.callback(None)
        elif self.requests:
            self._connect()
Called when the protocol connection is lost

        - Log the disconnection.
        - Mark any outstanding requests as unsent so they will be sent when
          a new connection is made.
        - If closing the broker client, mark completion of that process.

        :param reason:
            Failure that indicates the reason for disconnection.