From 0fb42a897731efaea3dcb8c4238707f38c0d4d3e 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/qpid@589778 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SemanticState.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp') diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp index e0e4315d03..7339150642 100644 --- a/cpp/src/qpid/broker/SemanticState.cpp +++ b/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