mirror of
https://github.com/curl/curl.git
synced 2026-08-25 23:33:37 +03:00
multi: timeout improvements
- Move expire timeout code from multi into splay.c - keep a "time_base" timestamp to calculate timediff_t for actual timeout values. Unfortunately this means our timeouts will go wrong after ~500,000 years of continuous operations... - use timediff_t as key in splay instead of curltime - use timediff_t in transfers expire times instead of curltime - re-comment splay.c for better understanding how it works - replace splay nodes double-linked "same" list with a single link, we almost never have duplicate keys - keep transfer `mid` in splay nodes instead of the transfer pointer - keep registered bit in splay node for tracking instead of separate bit in transfer - adapt unit1309.c to changes in timediff_t and mid Closes #22584
This commit is contained in:
parent
d854ab4673
commit
3d6d93a6be
19 changed files with 600 additions and 458 deletions
|
|
@ -1486,7 +1486,7 @@ static void http_exp100_continue(struct Curl_easy *data,
|
|||
struct cr_exp100_ctx *ctx = reader->ctx;
|
||||
if(ctx->state > EXP100_SEND_DATA) {
|
||||
ctx->state = EXP100_SEND_DATA;
|
||||
Curl_expire_done(data, EXPIRE_100_TIMEOUT);
|
||||
Curl_expire_clear(data, EXPIRE_100_TIMEOUT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1546,7 +1546,7 @@ static void cr_exp100_done(struct Curl_easy *data,
|
|||
{
|
||||
struct cr_exp100_ctx *ctx = reader->ctx;
|
||||
ctx->state = premature ? EXP100_FAILED : EXP100_SEND_DATA;
|
||||
Curl_expire_done(data, EXPIRE_100_TIMEOUT);
|
||||
Curl_expire_clear(data, EXPIRE_100_TIMEOUT);
|
||||
}
|
||||
|
||||
static const struct Curl_crtype cr_exp100 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue