From 943ddb17c7ce686cabc6fcca7e68bffa74fe61ce Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 4 Nov 2013 14:38:59 +0000 Subject: QPID-5288: add checking for connection/session close before waiting on Sender::close() git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1538629 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp index f390ee3f0e..5217bca7e7 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp @@ -249,7 +249,7 @@ void ConnectionContext::detach(boost::shared_ptr ssn, boost::sha } wakeupDriver(); while (pn_link_state(lnk->sender) & PN_REMOTE_ACTIVE) { - wait(); + wait(ssn); } ssn->removeSender(lnk->getName()); } @@ -262,7 +262,7 @@ void ConnectionContext::detach(boost::shared_ptr ssn, boost::sha } wakeupDriver(); while (pn_link_state(lnk->receiver) & PN_REMOTE_ACTIVE) { - wait(); + wait(ssn); } ssn->removeReceiver(lnk->getName()); } @@ -419,6 +419,7 @@ void ConnectionContext::check() void ConnectionContext::wait() { + check(); lock.wait(); check(); } -- cgit v1.2.1