From 0ae648d78f3970eb7fc96f000a5ba4f6444e4b6e Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 16 Oct 2007 09:11:48 +0000 Subject: * 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 --- cpp/src/qpid/sys/posix/AsynchIO.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 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 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(); } -- cgit v1.2.1