summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2020-04-13 19:18:15 +0200
committerMarc Hoersken <info@marc-hoersken.de>2020-04-14 17:50:38 +0200
commit8a2038a3ad36b292c0f15b4a5070fc3d78e7dc45 (patch)
tree921598d5c2f2483d2f0f64aa1e4b7b0cdb20d875 /tests
parent7bade50b6363e4f3e09a592e0ef10144833b7e97 (diff)
downloadcurl-8a2038a3ad36b292c0f15b4a5070fc3d78e7dc45.tar.gz
sockfilt: fix broken pipe on Windows to be ready in select_ws
Closes #5228
Diffstat (limited to 'tests')
-rw-r--r--tests/server/sockfilt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 166b75b38..60ee07f64 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -544,14 +544,17 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
}
}
else {
- /* if the pipe has been closed, sleep and continue waiting */
+ /* if the pipe has NOT been closed, sleep and continue waiting */
length = GetLastError();
- logmsg("[select_ws_wait_thread] PeekNamedPipe error: %d", length);
- if(length == ERROR_BROKEN_PIPE) {
+ if(length != ERROR_BROKEN_PIPE) {
+ logmsg("[select_ws_wait_thread] PeekNamedPipe err: %d", length);
SleepEx(0, FALSE);
ReleaseMutex(mutex);
continue;
}
+ else {
+ logmsg("[select_ws_wait_thread] pipe closed, PIPE: %p", handle);
+ }
}
/* there is some data available, stop waiting */
logmsg("[select_ws_wait_thread] data available, PIPE: %p", handle);