def _close_channel(self, frame_in):
        """Close Channel.

        :param specification.Channel.Close frame_in: Channel Close frame.
        :return:
        """
        if frame_in.reply_code != 200:
            reply_text = try_utf8_decode(frame_in.reply_text)
            message = (
                'Channel %d was closed by remote server: %s' %
                (
                    self._channel_id,
                    reply_text
                )
            )
            exception = AMQPChannelError(message,
                                         reply_code=frame_in.reply_code)
            self.exceptions.append(exception)
        self.set_state(self.CLOSED)
        if self._connection.is_open:

            try:
                self._connection.write_frame(
                    self.channel_id, specification.Channel.CloseOk()
                )
            except AMQPConnectionError:
                pass
        self.close()
def _close_channel ( self , frame_in ) : if frame_in . reply_code != 200 : reply_text = try_utf8_decode ( frame_in . reply_text ) message = ( 'Channel %d was closed by remote server: %s' % ( self . _channel_id , reply_text ) ) exception = AMQPChannelError ( message , reply_code = frame_in . reply_code ) self . exceptions . append ( exception ) self . set_state ( self . CLOSED ) if self . _connection . is_open : try : self . _connection . write_frame ( self . channel_id , specification . Channel . CloseOk ( ) ) except AMQPConnectionError : pass self . close ( )
Close Channel.

        :param specification.Channel.Close frame_in: Channel Close frame.
        :return: