summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2010-12-15 20:43:42 +0000
committerCharles E. Rolke <chug@apache.org>2010-12-15 20:43:42 +0000
commita5bde6b0bca2896eb8a10aea659c5fb98d46f37c (patch)
treecb2c50616944d76c76731bec2befded54de765b3 /cpp
parent1bf3d9136b140ae75d4040db376ee74f948f7b4b (diff)
downloadqpid-python-a5bde6b0bca2896eb8a10aea659c5fb98d46f37c.tar.gz
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
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/sys/windows/AsynchIO.cpp7
1 files changed, 4 insertions, 3 deletions
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();
+ }
}
}