From 44b1e15a0d200024eb48515d01dc541eb483cd34 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 25 Mar 2010 13:21:37 +0000 Subject: 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/qpid@927384 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/SessionImpl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/client/SessionImpl.cpp b/cpp/src/qpid/client/SessionImpl.cpp index 34589d59fc..05d90b4314 100644 --- a/cpp/src/qpid/client/SessionImpl.cpp +++ b/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(); -- cgit v1.2.1