diff options
Diffstat (limited to 'qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp index 578598a146..b113d49a73 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp +++ b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp @@ -130,6 +130,9 @@ void SessionHandler::handleException(const qpid::SessionException& e) } namespace { +bool isControl(const AMQFrame& f) { + return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_CONTROL; +} bool isCommand(const AMQFrame& f) { return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_COMMAND; } @@ -188,10 +191,9 @@ void SessionHandler::detach(const std::string& name) { void SessionHandler::detached(const std::string& name, uint8_t code) { CHECK_NAME(name, "session.detached"); awaitingDetached = false; - if (code != session::DETACH_CODE_NORMAL) { - sendReady = receiveReady = false; + if (code != session::DETACH_CODE_NORMAL) channelException(convert(code), "session.detached from peer."); - } else { + else { handleDetach(); } } |