summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qpid/cpp/src/qpid/broker/SemanticState.cpp12
-rw-r--r--qpid/cpp/src/qpid/broker/SemanticState.h1
2 files changed, 4 insertions, 9 deletions
diff --git a/qpid/cpp/src/qpid/broker/SemanticState.cpp b/qpid/cpp/src/qpid/broker/SemanticState.cpp
index 5d0024e290..38265c6e8d 100644
--- a/qpid/cpp/src/qpid/broker/SemanticState.cpp
+++ b/qpid/cpp/src/qpid/broker/SemanticState.cpp
@@ -95,7 +95,7 @@ void SemanticState::closed() {
//now unsubscribe, which may trigger queue deletion and thus
//needs to occur after the requeueing of unacked messages
for (ConsumerImplMap::iterator i = consumers.begin(); i != consumers.end(); i++) {
- unsubscribe(i->second);
+ cancel(i->second);
}
closeComplete = true;
}
@@ -432,8 +432,10 @@ void SemanticState::disable(ConsumerImpl::shared_ptr c)
session.getConnection().outputTasks.removeOutputTask(c.get());
}
-void SemanticState::unsubscribe(ConsumerImpl::shared_ptr c)
+
+void SemanticState::cancel(ConsumerImpl::shared_ptr c)
{
+ disable(c);
Queue::shared_ptr queue = c->getQueue();
if(queue) {
queue->cancel(c);
@@ -441,13 +443,7 @@ void SemanticState::unsubscribe(ConsumerImpl::shared_ptr c)
Queue::tryAutoDelete(session.getBroker(), queue);
}
}
-}
-
-void SemanticState::cancel(ConsumerImpl::shared_ptr c)
-{
c->cancel();
- disable(c);
- unsubscribe(c);
}
void SemanticState::handle(intrusive_ptr<Message> msg) {
diff --git a/qpid/cpp/src/qpid/broker/SemanticState.h b/qpid/cpp/src/qpid/broker/SemanticState.h
index 09721daaf5..e0bbcbcf12 100644
--- a/qpid/cpp/src/qpid/broker/SemanticState.h
+++ b/qpid/cpp/src/qpid/broker/SemanticState.h
@@ -190,7 +190,6 @@ class SemanticState : private boost::noncopyable {
AckRange findRange(DeliveryId first, DeliveryId last);
void requestDispatch();
void cancel(ConsumerImpl::shared_ptr);
- void unsubscribe(ConsumerImpl::shared_ptr);
void disable(ConsumerImpl::shared_ptr);
public: