From dbaedebe0bd8cbf041727be0aeae7a27bf8961f3 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 1 Aug 2011 15:24:59 +0000 Subject: QPID-3383: Changed to explicit credit management for control subscription in publishers to prevent incorrect allocation git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1152825 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/qpid-perftest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/tests/qpid-perftest.cpp b/cpp/src/tests/qpid-perftest.cpp index 8a5cf05775..1ca12a726d 100644 --- a/cpp/src/tests/qpid-perftest.cpp +++ b/cpp/src/tests/qpid-perftest.cpp @@ -510,10 +510,11 @@ struct PublishThread : public Client { } SubscriptionManager subs(session); LocalQueue lq; - subs.setFlowControl(1, SubscriptionManager::UNLIMITED, true); - subs.subscribe(lq, fqn("pub_start")); + subs.setFlowControl(0, SubscriptionManager::UNLIMITED, false); + Subscription cs = subs.subscribe(lq, fqn("pub_start")); for (size_t j = 0; j < opts.iterations; ++j) { + cs.grantMessageCredit(1); expect(lq.pop().getData(), "start"); AbsTime start=now(); for (size_t i=0; i