From 270ee547ecd8fa5f0a276777105a4c8121efc5fc Mon Sep 17 00:00:00 2001 From: Toby Gray Date: Wed, 8 Sep 2010 12:35:30 +0100 Subject: [PATCH] Lib: Updating comments in raw channel to clarify behaviour. --- src/m_raw_channel.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/m_raw_channel.cc b/src/m_raw_channel.cc index da6e6291..c0ebafb8 100644 --- a/src/m_raw_channel.cc +++ b/src/m_raw_channel.cc @@ -148,13 +148,15 @@ void RawChannel::OnOpen() SocketRoutingQueue::SocketDataHandlerPtr callback; callback.reset(new RawChannelSocketHandler(*this)); m_con.m_queue->RegisterInterest(0, callback); - // Get socket data packets routed to this class as well if using callback - // otherside just request interest - if( !m_callback ) { - // Don't want to be called back immediately on data - callback.reset(); + // Get socket data packets routed to this class as well if a + // callback was provided, otherside just get the data packets + // placed into a queue for the socket. + if( m_callback ) { + m_socket->RegisterInterest(callback); + } + else { + m_socket->RegisterInterest(NULL); } - m_socket->RegisterInterest(callback); } -- 2.11.4.GIT