pingpong: cleanup timeleft handling

- Move `RESP_TIMEOUT` from urldata.h to pingpong.h as
  `PINGPONG_TIMEOUT_MS`.
- Rename `Curl_pp_state_timeout()` to `Curl_pp_state_timeleft_ms()` as
  the function returns the time left, not the timout..
- Update implementation comments and variable names

Closes #20888
This commit is contained in:
Stefan Eissing 2026-03-11 14:43:14 +01:00 committed by Daniel Stenberg
parent da7bfb89a1
commit f14ce01369
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 23 additions and 30 deletions

View file

@ -657,7 +657,7 @@ static CURLcode getftpresponse(struct Curl_easy *data,
while(!*ftpcodep && !result) {
/* check and reset timeout value every lap */
timediff_t timeout = Curl_pp_state_timeout(data, pp);
timediff_t timeout = Curl_pp_state_timeleft_ms(data, pp);
timediff_t interval_ms;
if(timeout <= 0) {