transfer: adjust_pollset improvements

- let `multi_getsock()` initialize the pollset in what the
  transfer state requires in regards to SEND/RECV
- change connection filters `adjust_pollset()` implementation
  to react on the presence of POLLIN/-OUT in the pollset and
  no longer check CURL_WANT_SEND/CURL_WANT_RECV
- cf-socket will no longer add POLLIN on its own
- http2 and http/3 filters will only do adjustments if the
  passed pollset wants to POLLIN/OUT for the transfer on
  the socket. This is similar to the HTTP/2 proxy filter
  and works in stacked filters.

Closes #12640
This commit is contained in:
Stefan Eissing 2024-01-05 12:28:09 +01:00 committed by Daniel Stenberg
parent 8edcfedc1a
commit a0f94800d5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 125 additions and 107 deletions

View file

@ -1243,7 +1243,7 @@ static void cf_socket_adjust_pollset(struct Curl_cfilter *cf,
if(ctx->sock != CURL_SOCKET_BAD) {
if(!cf->connected)
Curl_pollset_set_out_only(data, ps, ctx->sock);
else if(CURL_WANT_RECV(data))
else if(!ctx->active)
Curl_pollset_add_in(data, ps, ctx->sock);
CURL_TRC_CF(data, cf, "adjust_pollset -> %d socks", ps->num);
}