diff options
| author | Alan Conway <aconway@apache.org> | 2008-12-08 12:00:58 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-12-08 12:00:58 +0000 |
| commit | a90b506a12e71b1fa3bbaf0b0a95d62c42d3fd3d (patch) | |
| tree | cc11944134ff378361c6371aaa3f71c69ac27dc2 /cpp/src/qpid/cluster/Connection.cpp | |
| parent | f739d191af76b1b22416f914212153db40abc17d (diff) | |
| download | qpid-python-a90b506a12e71b1fa3bbaf0b0a95d62c42d3fd3d.tar.gz | |
Cluster: fixed error in credit allocation.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@724326 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 8 |
1 files changed, 3 insertions, 5 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() { |
