def on_connection_closed(self, connection, reply_code, reply_text):
self._channel = None<EOL>if self._closing:<EOL><INDENT>self._connection.ioloop.stop()<EOL><DEDENT>else:<EOL><INDENT>_logger.warning('<STR_LIT>',<EOL>reply_code, reply_text)<EOL>self._connection.add_timeout(<NUM_LIT:5>, self.reconnect)<EOL><DEDENT>
This method is invoked by pika when the connection to RabbitMQ is
        closed unexpectedly. Since it is unexpected, we will reconnect to
        RabbitMQ if it disconnects.

        :param pika.connection.Connection connection: The closed connection obj
        :param int reply_code: The server provided reply_code if given
        :param str reply_text: The server provided reply_text if given