http: adjust_pollset fix

do not add a socket for POLLIN when the transfer does not want to send
(for example is paused).

Follow-up to 47f5b1a

Reported-by: bubbleguuum on github
Fixes #12632
Closes #12633
This commit is contained in:
Stefan Eissing 2024-01-04 10:06:17 +01:00 committed by Daniel Stenberg
parent 07bcae89d5
commit 8e2d7b9fa4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 8 additions and 7 deletions

View file

@ -2341,8 +2341,8 @@ static void cf_h2_adjust_pollset(struct Curl_cfilter *cf,
bool c_exhaust, s_exhaust;
CF_DATA_SAVE(save, cf, data);
c_exhaust = !nghttp2_session_get_remote_window_size(ctx->h2);
s_exhaust = stream && stream->id >= 0 &&
c_exhaust = want_send && !nghttp2_session_get_remote_window_size(ctx->h2);
s_exhaust = want_send && stream && stream->id >= 0 &&
!nghttp2_session_get_stream_remote_window_size(ctx->h2,
stream->id);
want_recv = (want_recv || c_exhaust || s_exhaust);