transfer: do not use EXPIRE_NOW while blocked

- When a transfer sets `data->state.select_bits`, it is
  scheduled for rerun with EXPIRE_NOW. If such a transfer
  is blocked (due to PAUSE, for example), this will lead to
  a busy loop.
- multi.c: check for transfer block
- sendf.*: add Curl_xfer_is_blocked()
- sendf.*: add client reader `is_paused()` callback
- implement is_paused()` callback where needed

Closes #13908
This commit is contained in:
Stefan Eissing 2024-06-07 14:38:51 +02:00 committed by Daniel Stenberg
parent 1424d507aa
commit 3841569ec8
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 86 additions and 2 deletions

View file

@ -2495,7 +2495,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
}
}
}
else if(data->state.select_bits) {
else if(data->state.select_bits && !Curl_xfer_is_blocked(data)) {
/* This avoids CURLM_CALL_MULTI_PERFORM so that a very fast transfer
won't get stuck on this transfer at the expense of other concurrent
transfers */