From b7fb9f5027f2bf8920a6e32c649c4181db405fa9 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 5 Mar 2009 22:05:26 +0000 Subject: QPID-1718: Ensure that cancellation caused by e.g. SubscriptionManager::get() doesn't close dispatch queue. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@750622 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/Dispatcher.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cpp/src/qpid/client') diff --git a/cpp/src/qpid/client/Dispatcher.cpp b/cpp/src/qpid/client/Dispatcher.cpp index 27cc4184f9..8d8574520a 100644 --- a/cpp/src/qpid/client/Dispatcher.cpp +++ b/cpp/src/qpid/client/Dispatcher.cpp @@ -136,8 +136,7 @@ void Dispatcher::listen(const boost::intrusive_ptr& subscripti void Dispatcher::cancel(const std::string& destination) { ScopedLock l(lock); - listeners.erase(destination); - if (autoStop && listeners.empty()) + if (listeners.erase(destination) && running && autoStop && listeners.empty()) queue->close(); } -- cgit v1.2.1