summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-10-16 09:11:48 +0000
committerGordon Sim <gsim@apache.org>2007-10-16 09:11:48 +0000
commit0ae648d78f3970eb7fc96f000a5ba4f6444e4b6e (patch)
treecec83f3aa78dfdebc8c1828af30d0f42d6a2d64a /cpp/src/qpid/sys
parent83e8536cab73c5d5e176d31abee62fafa3ff251e (diff)
downloadqpid-python-0ae648d78f3970eb7fc96f000a5ba4f6444e4b6e.tar.gz
* Revised allocation algorithm to ensure all consumers are given the opportunity to consume a message
* If already have infinit credit, don't try to add to it * If get disconnected while processing close, just finish off the close and don't signal the disconnection git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@585085 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys')
-rw-r--r--cpp/src/qpid/sys/posix/AsynchIO.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/cpp/src/qpid/sys/posix/AsynchIO.cpp b/cpp/src/qpid/sys/posix/AsynchIO.cpp
index ffb7c867e4..c8babaf421 100644
--- a/cpp/src/qpid/sys/posix/AsynchIO.cpp
+++ b/cpp/src/qpid/sys/posix/AsynchIO.cpp
@@ -292,12 +292,10 @@ void AsynchIO::writeable(DispatchHandle& h) {
}
void AsynchIO::disconnected(DispatchHandle& h) {
- // If we've already queued close do it before callback
- if (queuedClose) {
- close(h);
- }
-
- if (disCallback) {
+ // If we've already queued close do it instead of disconnected callback
+ if (queuedClose) {
+ close(h);
+ } else if (disCallback) {
disCallback(*this);
h.unwatch();
}