xfer: manage pause bits

Concentrate the handling of KEEP_RECV_PAUSE and KEEP_SEND_PAUSE into
common transfer functions. Setting or clearing these bits requires
subsequent actions involving connection events and client reader/writer
notifications. Have it in one place.

Closes #17650
This commit is contained in:
Stefan Eissing 2025-06-17 13:13:26 +02:00 committed by Daniel Stenberg
parent e60103cbb8
commit 0d70dfb79b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 114 additions and 76 deletions

View file

@ -435,7 +435,7 @@ CURLcode Curl_req_send_more(struct Curl_easy *data)
/* Fill our send buffer if more from client can be read. */
if(!data->req.upload_aborted &&
!data->req.eos_read &&
!(data->req.keepon & KEEP_SEND_PAUSE) &&
!Curl_xfer_send_is_paused(data) &&
!Curl_bufq_is_full(&data->req.sendbuf)) {
ssize_t nread = Curl_bufq_sipn(&data->req.sendbuf, 0,
add_from_client, data, &result);