mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
tests/server: sync wait_ms() with the libcurl implementation
It contains a series of bugfixes and updates applied to libcurl's `Curl_wait_ms()` over the years, but missed from the copy in `tests/server/util.c`: -d65321f939,52e822173a,5912da253b-4a8f459837-1ad49feb71It fixes `wait_ms()` to check for, and return `SOCKERRNO`. Fixing error handling on Windows. Also: - tests/server: change callers to check `SOCKERRNO`. - `wait_ms()`: fix to check for the correct error code on Windows. Pending for `Curl_wait_ms()`: #16621. - `Curl_wait_ms()`: tidy-up `Sleep()` argument cast (nit). - lib/curl_trc: drop an unused header. Closes #16627
This commit is contained in:
parent
454762d5ca
commit
5681628e2d
9 changed files with 34 additions and 51 deletions
|
|
@ -1253,9 +1253,9 @@ static curl_socket_t sockfilt_sockdaemon(curl_socket_t sock,
|
|||
rc = wait_ms(delay);
|
||||
if(rc) {
|
||||
/* should not happen */
|
||||
error = errno;
|
||||
error = SOCKERRNO;
|
||||
logmsg("wait_ms() failed with error (%d) %s",
|
||||
error, strerror(error));
|
||||
error, sstrerror(error));
|
||||
sclose(sock);
|
||||
return CURL_SOCKET_BAD;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue