mirror of
https://github.com/curl/curl.git
synced 2026-08-25 04:53:31 +03:00
multi: fix polling with pending input
When multi creates the pollset of a transfer, it checks now if a connection (FIRST/SECONDARY) socket waits on POLLIN and has input data pending in filters (relevant to OpenSSL's new read ahead). If so, it triggers a timeout on the transfer via EXPIRE_RUN_NOW. This fixes sporadic stalls in test 988 when running event based. Closes #17636
This commit is contained in:
parent
739c09c8a4
commit
62349e45a8
3 changed files with 32 additions and 0 deletions
|
|
@ -1069,3 +1069,16 @@ void Curl_pollset_check(struct Curl_easy *data,
|
|||
}
|
||||
*pwant_read = *pwant_write = FALSE;
|
||||
}
|
||||
|
||||
bool Curl_pollset_want_read(struct Curl_easy *data,
|
||||
struct easy_pollset *ps,
|
||||
curl_socket_t sock)
|
||||
{
|
||||
unsigned int i;
|
||||
(void)data;
|
||||
for(i = 0; i < ps->num; ++i) {
|
||||
if((ps->sockets[i] == sock) && (ps->actions[i] & CURL_POLL_IN))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue