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:
Родитель
0caae3c4be
Коммит
cf7760ab52
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче