summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-10-26 19:23:47 +0000
committerAlan Conway <aconway@apache.org>2009-10-26 19:23:47 +0000
commit3bb44f765c64867196c00801f7299d490c41b5f4 (patch)
treeaf23ba2b247be025f1882b063f0014e82f332381 /qpid/cpp/src
parent6457b7c0987540e9f5e358580d9c5dd5d10a9c4d (diff)
downloadqpid-python-3bb44f765c64867196c00801f7299d490c41b5f4.tar.gz
Ignore exceptions from detach() in ~SessionImpl.
Otherwise clients can crash in terminate() if there is an error, e.g. a TransportFailure. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@829912 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/client/SessionImpl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/client/SessionImpl.cpp b/qpid/cpp/src/qpid/client/SessionImpl.cpp
index d443a1170b..b3181bdb3c 100644
--- a/qpid/cpp/src/qpid/client/SessionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/SessionImpl.cpp
@@ -76,9 +76,11 @@ SessionImpl::~SessionImpl() {
Lock l(state);
if (state != DETACHED && state != DETACHING) {
QPID_LOG(warning, "Session was not closed cleanly: " << id);
- // Inform broker but don't wait for detached as that deadlocks.
- // The detached will be ignored as the channel will be invalid.
- if (autoDetach) detach();
+ try {
+ // Inform broker but don't wait for detached as that deadlocks.
+ // The detached will be ignored as the channel will be invalid.
+ if (autoDetach) detach();
+ } catch (...) {} // ignore errors.
setState(DETACHED);
handleClosed();
state.waitWaiters();