mirror of
https://github.com/curl/curl.git
synced 2026-04-15 09:31:42 +03: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue