From 54a9a26d27a59b2cc409bc7aee4c4cfcf2da8b00 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 6 Nov 2008 18:24:17 +0000 Subject: QPID-1413: disable output before sending detach git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711931 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SessionState.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/broker/SessionState.cpp') diff --git a/cpp/src/qpid/broker/SessionState.cpp b/cpp/src/qpid/broker/SessionState.cpp index 7910ef3f0c..fe10345499 100644 --- a/cpp/src/qpid/broker/SessionState.cpp +++ b/cpp/src/qpid/broker/SessionState.cpp @@ -93,13 +93,18 @@ bool SessionState::isLocal(const ConnectionToken* t) const void SessionState::detach() { QPID_LOG(debug, getId() << ": detached on broker."); - semanticState.detached();//prevents further activateOutput calls until reattached - getConnection().outputTasks.removeOutputTask(&semanticState); + disableOutput(); handler = 0; if (mgmtObject != 0) mgmtObject->set_attached (0); } +void SessionState::disableOutput() +{ + semanticState.detached();//prevents further activateOutput calls until reattached + getConnection().outputTasks.removeOutputTask(&semanticState); +} + void SessionState::attach(SessionHandler& h) { QPID_LOG(debug, getId() << ": attached on broker."); handler = &h; -- cgit v1.2.1