From bf41dcba4ea632536ed743f980b4306830d8b2cf Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Wed, 15 Dec 2010 20:43:42 +0000 Subject: QPID-2967 Windows broker fails to destroy connections if client exits abruptly In win::AsynchIOReadComplete(): If there is no data, always call notifyEof(). If status is nonZero then also call notifyDisconnect(). Reviewed by astitcher. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1049702 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/windows/AsynchIO.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/sys/windows/AsynchIO.cpp b/cpp/src/qpid/sys/windows/AsynchIO.cpp index c55d34e875..38d8842521 100644 --- a/cpp/src/qpid/sys/windows/AsynchIO.cpp +++ b/cpp/src/qpid/sys/windows/AsynchIO.cpp @@ -630,10 +630,11 @@ void AsynchIO::readComplete(AsynchReadResult *result) { // No data read, so put the buffer back. It may be partially filled, // so "unread" it back to the front of the queue. unread(result->getBuff()); - if (status == 0) - notifyEof(); - else + notifyEof(); + if (status != 0) + { notifyDisconnect(); + } } } -- cgit v1.2.1