select: return error from "lethal" poll/select errors

Adds two new error codes: CURLE_UNRECOVERABLE_POLL and
CURLM_UNRECOVERABLE_POLL one each for the easy and the multi interfaces.

Reported-by: Harry Sintonen
Fixes #8921
Closes #8961
This commit is contained in:
Daniel Stenberg 2022-06-08 11:03:07 +02:00
parent 7007324a6a
commit 5912da253b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 37 additions and 8 deletions

View file

@ -1312,6 +1312,8 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
#else
pollrc = Curl_poll(ufds, nfds, timeout_ms); /* wait... */
#endif
if(pollrc < 0)
return CURLM_UNRECOVERABLE_POLL;
if(pollrc > 0) {
retcode = pollrc;