diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2015-12-16 15:32:31 +0100 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2015-12-16 15:32:31 +0100 |
commit | f4646b90692cc0ea61616e71c9376890b68f8249 (patch) | |
tree | 13bb4427dc2c48e0878d9c66af854f7bf3f59bc7 /tests/server | |
parent | 151da51404b46e011bfd0466af5d31af4cb33721 (diff) |
sockfilt.c: do not wait on unreliable file or pipe handle
The previous implementation caused issues on modern MSYS2 runtimes.
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/sockfilt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index a4496e0fb..0530dad3f 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -547,8 +547,8 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter) * Approach: Loop till either the internal event is signalled * or if the end of the file has already been reached. */ - while(WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE) - == WAIT_OBJECT_0 + 1) { + while(WaitForMultipleObjectsEx(1, handles, FALSE, 0, FALSE) + == WAIT_TIMEOUT) { /* get total size of file */ length = 0; size.QuadPart = 0; @@ -611,8 +611,8 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter) * Approach: Loop till either the internal event is signalled * or there is data in the pipe available for reading. */ - while(WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE) - == WAIT_OBJECT_0 + 1) { + while(WaitForMultipleObjectsEx(1, handles, FALSE, 0, FALSE) + == WAIT_TIMEOUT) { /* peek into the pipe and retrieve the amount of data available */ length = 0; if(PeekNamedPipe(handle, NULL, 0, NULL, &length, NULL)) { |