aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2013-03-11 16:57:25 +0100
committerKamil Dudka <kdudka@redhat.com>2013-03-12 10:58:19 +0100
commit491e026ccda0e60975fa6e2e9cf3ccca37e18f7b (patch)
tree347480fd46204b3714a7c96260dad5aaa2df0699 /lib
parent83a42ee20ea7fc25abb61c0b7ef56ebe712d7093 (diff)
easy: do not ignore poll() failures other than EINTR
Diffstat (limited to 'lib')
-rw-r--r--lib/easy.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/easy.c b/lib/easy.c
index c27deffda..2e747bb28 100644
--- a/lib/easy.c
+++ b/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) {