summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/amqp/Session.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qpid/broker/amqp/Session.cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/amqp/Session.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/amqp/Session.cpp b/qpid/cpp/src/qpid/broker/amqp/Session.cpp
index 1749725047..fb3c220d02 100644
--- a/qpid/cpp/src/qpid/broker/amqp/Session.cpp
+++ b/qpid/cpp/src/qpid/broker/amqp/Session.cpp
@@ -202,7 +202,8 @@ class IncomingToExchange : public DecodingIncoming
Session::Session(pn_session_t* s, Connection& c, qpid::sys::OutputControl& o)
: ManagedSession(c.getBroker(), c, (boost::format("%1%") % s).str()), session(s), connection(c), out(o), deleted(false),
- authorise(connection.getUserId(), connection.getBroker().getAcl()) {}
+ authorise(connection.getUserId(), connection.getBroker().getAcl()),
+ detachRequested() {}
Session::ResolvedNode Session::resolve(const std::string name, pn_terminus_t* terminus, bool incoming)
@@ -689,6 +690,17 @@ Authorise& Session::getAuthorise()
return authorise;
}
+bool Session::endedByManagement() const
+{
+ return detachRequested;
+}
+
+void Session::detachedByManagement()
+{
+ detachRequested = true;
+ wakeup();
+}
+
void IncomingToQueue::handle(qpid::broker::Message& message)
{
if (queue->isDeleted()) {