def _close_connection(self):
        LOGGER.info('Connection is idle, %i stale byte intervals',
                    self._idle_byte_intervals)
        duration = self._max_idle_count * self._interval
        text = HeartbeatChecker._STALE_CONNECTION % duration

        # NOTE: this won't achieve the perceived effect of sending
        # Connection.Close to broker, because the frame will only get buffered
        # in memory before the next statement terminates the connection.
        self._connection.close(HeartbeatChecker._CONNECTION_FORCED, text)

        self._connection._on_terminate(HeartbeatChecker._CONNECTION_FORCED,
                                       text)
Close the connection with the AMQP Connection-Forced value.
dataset/ETHPy150Open pika/pika/pika/heartbeat.py/HeartbeatChecker._close_connection