mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
tests/server: tidy-up error messages (Windows)
- show error description on `PeekNamedPipe()` error. - show `GetLastError()` instead of socket error on non-socket failures in the window handler. - include full hex `GetLastError()` numbers in error messages, syncing with Schannel code. - drop internal `win32_perror()` function, in favor of direct `curlx_*strerror()` calls. Closes #20477
This commit is contained in:
parent
4d0c3b690e
commit
373e89a021
2 changed files with 20 additions and 18 deletions
|
|
@ -526,7 +526,10 @@ static DWORD WINAPI select_ws_wait_thread(void *lpParameter)
|
|||
/* if the pipe has NOT been closed, sleep and continue waiting */
|
||||
ret = GetLastError();
|
||||
if(ret != ERROR_BROKEN_PIPE) {
|
||||
logmsg("[select_ws_wait_thread] PeekNamedPipe error (%lu)", ret);
|
||||
char buffer[WINAPI_ERROR_LEN];
|
||||
curlx_winapi_strerror(ret, buffer, sizeof(buffer));
|
||||
logmsg("[select_ws_wait_thread] PeekNamedPipe error: (0x%08lx) - %s",
|
||||
ret, buffer);
|
||||
SleepEx(0, FALSE);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue