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:
Stefan Eissing 2025-06-16 12:19:52 +02:00 committed by Viktor Szakats
parent 739c09c8a4
commit 62349e45a8
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
3 changed files with 32 additions and 0 deletions

View file

@ -620,6 +620,13 @@ void Curl_pollset_check(struct Curl_easy *data,
struct easy_pollset *ps, curl_socket_t sock,
bool *pwant_read, bool *pwant_write);
/**
* Return TRUE if the pollset contains socket with CURL_POLL_IN.
*/
bool Curl_pollset_want_read(struct Curl_easy *data,
struct easy_pollset *ps,
curl_socket_t sock);
/**
* Types and macros used to keep the current easy handle in filter calls,
* allowing for nested invocations. See #10336.