From 3673fea4a6bf99f9948fd7baf43a4c30b77f4871 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 14 Jul 2010 21:33:09 +0000 Subject: Fix read-credit bug causing cluster brokers to disconnect clients sporadically. Also added connection identifier in connection log messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@964213 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/posix/AsynchIO.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/sys') diff --git a/cpp/src/qpid/sys/posix/AsynchIO.cpp b/cpp/src/qpid/sys/posix/AsynchIO.cpp index 7d85b4325b..119a6aa8a4 100644 --- a/cpp/src/qpid/sys/posix/AsynchIO.cpp +++ b/cpp/src/qpid/sys/posix/AsynchIO.cpp @@ -400,10 +400,14 @@ AsynchIO::BufferBase* AsynchIO::getQueuedBuffer() { } /* - * We keep on reading as long as we have something to read and a buffer to put - * it in + * We keep on reading as long as we have something to read, a buffer + * to put it in and reading is not stopped by flow control. */ void AsynchIO::readable(DispatchHandle& h) { + if (readingStopped) { + // We have been flow controlled. + return; + } int readTotal = 0; AbsTime readStartTime = AbsTime::now(); do { -- cgit v1.2.1