summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-03-25 13:21:37 +0000
committerAlan Conway <aconway@apache.org>2010-03-25 13:21:37 +0000
commit9a35c28398ca0cbcbd88850a99abef6709753601 (patch)
treea11299781a41bd9703e11cc9d199e2154009c2d9 /qpid/cpp/src
parent1170e6411fe4f5350bb0c6a82504eeac1adb67c2 (diff)
downloadqpid-python-9a35c28398ca0cbcbd88850a99abef6709753601.tar.gz
Fix "Session was not closed cleanly" warnings in a cluster broker giving an update.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@927384 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/client/SessionImpl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/client/SessionImpl.cpp b/qpid/cpp/src/qpid/client/SessionImpl.cpp
index 34589d59fc..05d90b4314 100644
--- a/qpid/cpp/src/qpid/client/SessionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/SessionImpl.cpp
@@ -73,12 +73,12 @@ SessionImpl::~SessionImpl() {
{
Lock l(state);
if (state != DETACHED && state != DETACHING) {
- QPID_LOG(warning, "Session was not closed cleanly: " << id);
- try {
+ if (autoDetach) {
+ 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();
- } catch (...) {} // ignore errors.
+ try { detach(); } catch (...) {} // ignore errors.
+ }
setState(DETACHED);
handleClosed();
state.waitWaiters();