mirror of
https://github.com/curl/curl.git
synced 2026-06-16 10:25:39 +03:00
easy: do not ignore poll() failures other than EINTR
This commit is contained in:
parent
83a42ee20e
commit
491e026ccd
2 changed files with 11 additions and 2 deletions
12
lib/easy.c
12
lib/easy.c
|
|
@ -441,11 +441,19 @@ CURLcode curl_easy_perform(CURL *easy)
|
|||
|
||||
while(!done && !mcode) {
|
||||
int still_running;
|
||||
int ret;
|
||||
|
||||
mcode = curl_multi_wait(multi, NULL, 0, 1000, NULL);
|
||||
mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret);
|
||||
|
||||
if(mcode == CURLM_OK) {
|
||||
if(ret == -1) {
|
||||
/* poll() failed not on EINTR, indicate a network problem */
|
||||
code = CURLE_RECV_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
if(mcode == CURLM_OK)
|
||||
mcode = curl_multi_perform(multi, &still_running);
|
||||
}
|
||||
|
||||
/* only read 'still_running' if curl_multi_perform() return OK */
|
||||
if((mcode == CURLM_OK) && !still_running) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue