if (channel == null)
{
throw body.getConnectionException(AMQConstant.CHANNEL_ERROR, "Trying to close unknown channel");
}
channel.sync();
session.closeChannel(channelId);
// Client requested closure so we don't wait for ok we send it
stateManager.getProtocolSession().closeChannelOk(channelId);
MethodRegistry methodRegistry = session.getMethodRegistry();
ChannelCloseOkBody responseBody = methodRegistry.createChannelCloseOkBody();