summaryrefslogtreecommitdiff
path: root/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
commitf5c7bf95dd04dc1cf0248511982a18a45847da14 (patch)
treef1fd9c7defccca004ddc500275edd5ddc1b7b4c8 /cpp/src
parent8dadc8616218f223a3cff1f7aa7effb1a2973181 (diff)
downloadqpid-python-f5c7bf95dd04dc1cf0248511982a18a45847da14.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/qpid@829912 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/client/SessionImpl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/SessionImpl.cpp b/cpp/src/qpid/client/SessionImpl.cpp
index d443a1170b..b3181bdb3c 100644
--- a/cpp/src/qpid/client/SessionImpl.cpp
+++ b/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();