mirror of
https://github.com/moparisthebest/curl
synced 2024-11-04 16:45:06 -05:00
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
This commit is contained in:
parent
0caae3c4be
commit
cf7760ab52
@ -1199,7 +1199,7 @@ static CURLMcode Curl_multi_wait(struct Curl_multi *multi,
|
|||||||
data from it until it receives an error (except EINTR).
|
data from it until it receives an error (except EINTR).
|
||||||
In normal cases it will get EAGAIN or EWOULDBLOCK
|
In normal cases it will get EAGAIN or EWOULDBLOCK
|
||||||
when there is no more data, breaking the loop. */
|
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
|
#ifndef USE_WINSOCK
|
||||||
if(EINTR == SOCKERRNO)
|
if(EINTR == SOCKERRNO)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user