]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/server/sockfilt: avoid possible endless loop on Windows
authorViktor Szakats <commit@vsz.me>
Thu, 29 Jan 2026 21:57:19 +0000 (22:57 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 29 Jan 2026 22:25:36 +0000 (23:25 +0100)
Seen to happen when run under WINE v10.0 on macOS.
```
$ CURL_TEST_EXE_EXT_SRV=.exe CURL_TEST_EXE_EXT_TOOL=.exe \
CURL_TEST_EXE_RUNNER=wine TFLAGS='951 -t' ninja tests
[...]
16:02:18.607002 [select_ws_wait_thread] PeekNamedPipe error: (0x00000032) - Request not supported.
[...endless repeat...]
```

Closes #20478

tests/server/sockfilt.c

index 549eb1fcf79418af30d34b8154305ccdfdf053a0..9d132b939273f1d9749d9280458f4db8cb30e18b 100644 (file)
@@ -530,6 +530,8 @@ static DWORD WINAPI select_ws_wait_thread(void *lpParameter)
           curlx_winapi_strerror(ret, buffer, sizeof(buffer));
           logmsg("[select_ws_wait_thread] PeekNamedPipe error: (0x%08lx) - %s",
                  ret, buffer);
+          if(ret == ERROR_NOT_SUPPORTED)  /* avoid potential endless loop */
+             break;
           SleepEx(0, FALSE);
           continue;
         }