aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-03-02 10:38:53 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-02 15:45:05 +0100
commitcf7760ab521d1f9fc6a526df7dedfb7b0c3a6f17 (patch)
treebfc1b064900eb4fcc02ce85b74416fe4d32e628b /lib
parent0caae3c4be47c7859eb1f26ffa7a0cf4b5a82160 (diff)
multi_wait: stop loop when sread() returns zero
It's unclear why it would ever return zero here, but this change fixes Robert's problem and it shouldn't loop forever... Reported-by: Robert Dunaj Bug: https://curl.haxx.se/mail/archive-2020-02/0011.html Closes #5019
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index ef86f7c22..cef2805c8 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1199,7 +1199,7 @@ static CURLMcode Curl_multi_wait(struct Curl_multi *multi,
data from it until it receives an error (except EINTR).
In normal cases it will get EAGAIN or EWOULDBLOCK
when there is no more data, breaking the loop. */
- if(sread(multi->wakeup_pair[0], buf, sizeof(buf)) < 0) {
+ if(sread(multi->wakeup_pair[0], buf, sizeof(buf)) <= 0) {
#ifndef USE_WINSOCK
if(EINTR == SOCKERRNO)
continue;