summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-12-02 18:34:06 +0000
committerGordon Sim <gsim@apache.org>2008-12-02 18:34:06 +0000
commit7ea9a39bf9c3724dd263f454f99bda9a0ead64d0 (patch)
treed3b761e360d657cf4d365e8418dd2b8f9b9e2a42 /qpid/cpp/src
parent296872da58c12bae96287830dfc8bafd2f53abad (diff)
downloadqpid-python-7ea9a39bf9c3724dd263f454f99bda9a0ead64d0.tar.gz
Avoid potential deadlock between IO thread in Connector::handleClosed() and application thread in ConnectionImpl::closed()
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@722554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/client/ConnectionImpl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
index b284fb6312..0d7ffa0288 100644
--- a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
@@ -134,7 +134,10 @@ void ConnectionImpl::close()
template <class F> void ConnectionImpl::closeInternal(const F& f) {
- connector->close();
+ {
+ Mutex::ScopedUnlock u(lock);
+ connector->close();
+ }
//notifying sessions of failure can result in those session being
//deleted which in turn results in a call to erase(); this can
//even happen on this thread, when 's' goes out of scope