Author: chug
Date: Wed Dec 15 20:43:42 2010
New Revision: 1049702

URL: http://svn.apache.org/viewvc?rev=1049702&view=rev
Log:
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.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp?rev=1049702&r1=1049701&r2=1049702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp Wed Dec 15 20:43:42 
2010
@@ -630,10 +630,11 @@ void AsynchIO::readComplete(AsynchReadRe
         // 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();
+        }
     }
 }
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to