summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/posix/AsynchIO.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-07-14 21:33:09 +0000
committerAlan Conway <aconway@apache.org>2010-07-14 21:33:09 +0000
commit3673fea4a6bf99f9948fd7baf43a4c30b77f4871 (patch)
tree7b1276bb31a1dfd19e7d4b77e5cc28116439bef2 /cpp/src/qpid/sys/posix/AsynchIO.cpp
parentef6a1528f91c34c0cc9838ad6f5ec39473fbbdb3 (diff)
downloadqpid-python-3673fea4a6bf99f9948fd7baf43a4c30b77f4871.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/sys/posix/AsynchIO.cpp')
-rw-r--r--cpp/src/qpid/sys/posix/AsynchIO.cpp8
1 files changed, 6 insertions, 2 deletions
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 {