public void CloseSession(AmqChannel channel) { // FIXME: Don't we need FailoverSupport here (as we have SyncWrite). _protocolSession.CloseSession(channel); AMQFrame frame = ChannelCloseBody.CreateAMQFrame( channel.ChannelId, 200, "JMS client closing channel", 0, 0); _log.Debug("Blocking for channel close frame for channel " + channel.ChannelId); _protocolWriter.SyncWrite(frame, typeof(ChannelCloseOkBody)); _log.Debug("Received channel close frame"); // When control resumes at this point, a reply will have been received that // indicates the broker has closed the channel successfully }