From a611e44f9a7d598bbbffe73f59e592739ddfeeaa Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 29 Nov 2016 11:28:26 +1100 Subject: [PATCH] 4519. [port] win32: handle ERROR_MORE_DATA. [RT #43534] --- CHANGES | 2 ++ lib/isc/win32/socket.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 0e18b48abe..dda1f6c315 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +4519. [port] win32: handle ERROR_MORE_DATA. [RT #43534] + 4518. [func] The "print-time" option in the logging configuration can now take arguments "local", "iso8601" or "iso8601-utc" to indicate the format in which the diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index ca032d2210..133f31a84e 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -2515,14 +2515,16 @@ SocketIoThread(LPVOID ThreadContext) { request = lpo->request_type; - errstatus = 0; - if (!bSuccess) { + if (!bSuccess) + errstatus = GetLastError(); + else + errstatus = 0; + if (!bSuccess && errstatus != ERROR_MORE_DATA) { isc_result_t isc_result; /* * Did the I/O operation complete? */ - errstatus = GetLastError(); isc_result = isc__errno2result(errstatus); LOCK(&sock->lock);