diff options
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 8 | ||||
| -rw-r--r-- | cpp/src/qpid/cluster/OutputInterceptor.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 27b391a1c7..1023e86bae 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -75,7 +75,7 @@ void Connection::init() { QPID_LOG(debug, cluster << " new connection: " << *this); if (isLocal() && !isCatchUp()) { // FIXME aconway 2008-12-05: configurable credit limit - output.giveReadCredit(3); + output.giveReadCredit(10); } } @@ -91,7 +91,7 @@ bool Connection::doOutput() { // which stocks up the write buffers with data. // void Connection::deliverDoOutput(uint32_t requested) { - assert(!catchUp); + output.deliverDoOutput(requested); } @@ -191,7 +191,6 @@ size_t Connection::decode(const char* buffer, size_t size) { Buffer buf(const_cast<char*>(buffer), size); while (localDecoder.decode(buf)) received(localDecoder.frame); - output.giveReadCredit(1); } else { // Multicast local connections. assert(isLocal()); @@ -205,8 +204,7 @@ void Connection::deliverBuffer(Buffer& buf) { ++deliverSeq; while (mcastDecoder.decode(buf)) delivered(mcastDecoder.frame); - if (isLocal()) - output.giveReadCredit(1); + output.giveReadCredit(1); } broker::SessionState& Connection::sessionState() { diff --git a/cpp/src/qpid/cluster/OutputInterceptor.cpp b/cpp/src/qpid/cluster/OutputInterceptor.cpp index 77ed154bd0..37b5b1a3e6 100644 --- a/cpp/src/qpid/cluster/OutputInterceptor.cpp +++ b/cpp/src/qpid/cluster/OutputInterceptor.cpp @@ -76,10 +76,12 @@ void OutputInterceptor::deliverDoOutput(size_t requested) { // Run the real doOutput() till we have added the requested data or there's nothing to output. sent = 0; + { + sys::Mutex::ScopedUnlock u(lock); do { - sys::Mutex::ScopedUnlock u(lock); moreOutput = parent.getBrokerConnection().doOutput(); } while (sent < requested && moreOutput); + } sent += buf; // Include buffered data in the sent total. QPID_LOG(trace, "Delivered doOutput: requested=" << requested << " output=" << sent << " more=" << moreOutput); |
