diff options
-rw-r--r-- | cpp/src/qpid/broker/Connection.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp index dfe2101bc0..978228a364 100644 --- a/cpp/src/qpid/broker/Connection.cpp +++ b/cpp/src/qpid/broker/Connection.cpp @@ -56,7 +56,11 @@ void Connection::received(framing::AMQFrame& frame){ if (frame.getChannel() == 0) { adapter.handle(frame); } else { - getChannel((frame.getChannel())).in->handle(frame); + // Assign handler to new shared_ptr, as it may be erased + // from the map by handle() if frame is a ChannelClose. + // + FrameHandler::Chain handler=getChannel((frame.getChannel())).in; + handler->handle(frame); } } |