summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-11-04 14:38:59 +0000
committerGordon Sim <gsim@apache.org>2013-11-04 14:38:59 +0000
commit943ddb17c7ce686cabc6fcca7e68bffa74fe61ce (patch)
tree7cf807cf9614f9335ed552814707dc37abc94385
parentec2ccd25ad6f829fdda10d5650c9acf93b86e1b7 (diff)
downloadqpid-python-943ddb17c7ce686cabc6fcca7e68bffa74fe61ce.tar.gz
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
-rw-r--r--qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp5
1 files changed, 3 insertions, 2 deletions
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<SessionContext> 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<SessionContext> 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();
}