From 03c3f6edb2b17841053250bda46fde1054d32d67 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 6 Aug 2008 21:17:19 +0000 Subject: - Added OutputTask::hasOutput() test. - Cluster only sends doOutput events when hasOutput() git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683416 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/ConnectionInterceptor.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cpp/src/qpid/cluster/ConnectionInterceptor.cpp') diff --git a/cpp/src/qpid/cluster/ConnectionInterceptor.cpp b/cpp/src/qpid/cluster/ConnectionInterceptor.cpp index 32c2054631..656f05e685 100644 --- a/cpp/src/qpid/cluster/ConnectionInterceptor.cpp +++ b/cpp/src/qpid/cluster/ConnectionInterceptor.cpp @@ -82,15 +82,16 @@ void ConnectionInterceptor::deliverClosed() { } bool ConnectionInterceptor::doOutput() { - cluster.send(AMQFrame(in_place()), this); + if (connection->hasOutput()) { + printf("doOutput send %p\n", (void*)this); + cluster.send(AMQFrame(in_place()), this); + } + return false; } void ConnectionInterceptor::deliverDoOutput() { - // FIXME aconway 2008-07-16: review thread safety. - // All connection processing happens in cluster queue, only read & write - // (from mutex-locked frameQueue) happens in reader/writer threads. - // + printf("doOutput deliver %p\n", (void*)this); doOutputNext(); } -- cgit v1.2.1