diff options
| author | Gordon Sim <gsim@apache.org> | 2008-12-02 18:34:06 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-12-02 18:34:06 +0000 |
| commit | 7ea9a39bf9c3724dd263f454f99bda9a0ead64d0 (patch) | |
| tree | d3b761e360d657cf4d365e8418dd2b8f9b9e2a42 | |
| parent | 296872da58c12bae96287830dfc8bafd2f53abad (diff) | |
| download | qpid-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
| -rw-r--r-- | qpid/cpp/src/qpid/client/ConnectionImpl.cpp | 5 |
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 |
