From f4f861fc5ea9847a12d9644ff1309b12954a66a6 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 29 Oct 2007 18:09:05 +0000 Subject: Check that session is attached before accepting delivery from queue (note further synching is required between the actually delivery of frames and the change from attached to detached). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@589778 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/SemanticState.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/broker/SemanticState.cpp b/qpid/cpp/src/qpid/broker/SemanticState.cpp index e0e4315d03..7339150642 100644 --- a/qpid/cpp/src/qpid/broker/SemanticState.cpp +++ b/qpid/cpp/src/qpid/broker/SemanticState.cpp @@ -248,6 +248,10 @@ SemanticState::ConsumerImpl::ConsumerImpl(SemanticState* _parent, bool SemanticState::ConsumerImpl::deliver(QueuedMessage& msg) { + if (!parent->getSession().isAttached()) { + return false; + } + if (nolocal && &parent->getSession().getConnection() == msg.payload->getPublisher()) { return false; -- cgit v1.2.1