mirror of
https://github.com/curl/curl.git
synced 2026-07-24 08:17:51 +03:00
lib: ratelimit timestamps
Remove the timestamp passed for ratelimit checks. Let the limit calculation obtain a timestamp when it needs it. Most transfers run without active ratelimits and getting a fresh timestamp is unnecessary. Closes #22292
This commit is contained in:
parent
c3ae9ef822
commit
34bc5b60bc
10 changed files with 31 additions and 23 deletions
|
|
@ -994,11 +994,10 @@ static CURLcode multi_adjust_pollset(struct Curl_easy *data,
|
|||
CURLcode result = CURLE_OK;
|
||||
|
||||
if(ps->n) {
|
||||
const struct curltime *pnow = Curl_pgrs_now(data);
|
||||
bool send_blocked, recv_blocked;
|
||||
|
||||
recv_blocked = (Curl_rlimit_avail(&data->progress.dl.rlimit, pnow) <= 0);
|
||||
send_blocked = (Curl_rlimit_avail(&data->progress.ul.rlimit, pnow) <= 0);
|
||||
recv_blocked = (Curl_rlimit_avail(&data->progress.dl.rlimit, NULL) <= 0);
|
||||
send_blocked = (Curl_rlimit_avail(&data->progress.ul.rlimit, NULL) <= 0);
|
||||
if(send_blocked || recv_blocked) {
|
||||
int i;
|
||||
for(i = 0; i <= SECONDARYSOCKET; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue