mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:43:40 +03:00
time-keeping: keep timestamp in multi, always update
Always use curlx_now() when calling Curl_pgrs_now(data). Tests with the "manual" updates to now proved differ more then 100ms in parallel testing. Add `curlx_nowp()` to set current time into a struct curltime. Add `curlx_ptimediff_ms() and friends, passing pointers. Update documentation. Closes #19998
This commit is contained in:
parent
308c347c8b
commit
b4be1f271e
61 changed files with 471 additions and 502 deletions
|
|
@ -1507,8 +1507,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
} /* switch */
|
||||
|
||||
if(data->set.timeout) {
|
||||
Curl_pgrs_now_set(data);
|
||||
if(curlx_timediff_ms(data->progress.now, conn->created) >=
|
||||
if(curlx_ptimediff_ms(Curl_pgrs_now(data), &conn->created) >=
|
||||
data->set.timeout) {
|
||||
failf(data, "Time-out");
|
||||
result = CURLE_OPERATION_TIMEDOUT;
|
||||
|
|
@ -1627,8 +1626,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
} /* poll switch statement */
|
||||
|
||||
if(data->set.timeout) {
|
||||
Curl_pgrs_now_set(data);
|
||||
if(curlx_timediff_ms(data->progress.now, conn->created) >=
|
||||
if(curlx_ptimediff_ms(Curl_pgrs_now(data), &conn->created) >=
|
||||
data->set.timeout) {
|
||||
failf(data, "Time-out");
|
||||
result = CURLE_OPERATION_TIMEDOUT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue