summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/SessionHandlerImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/lib/broker/SessionHandlerImpl.cpp')
-rw-r--r--cpp/lib/broker/SessionHandlerImpl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/lib/broker/SessionHandlerImpl.cpp b/cpp/lib/broker/SessionHandlerImpl.cpp
index 5ebc8c3709..da49a94d68 100644
--- a/cpp/lib/broker/SessionHandlerImpl.cpp
+++ b/cpp/lib/broker/SessionHandlerImpl.cpp
@@ -105,9 +105,11 @@ void SessionHandlerImpl::received(qpid::framing::AMQFrame* frame){
client->getChannel().close(channel, e.code, e.text, method->amqpClassId(), method->amqpMethodId());
}catch(ConnectionException& e){
client->getConnection().close(0, e.code, e.text, method->amqpClassId(), method->amqpMethodId());
+ context->close();
}catch(std::exception& e){
string error(e.what());
client->getConnection().close(0, 541/*internal error*/, error, method->amqpClassId(), method->amqpMethodId());
+ context->close();
}
break;