mirror of
https://github.com/curl/curl.git
synced 2026-07-31 15:08:02 +03:00
multi: during ratelimit multi_getsock should return no sockets
... as there is nothing to wait for then, it just waits. Otherwise, this causes much more CPU work and updates than necessary during ratelimit periods. Ref: https://curl.se/mail/lib-2023-11/0056.html Closes #12430
This commit is contained in:
parent
6a0dc7cf23
commit
d1c2bb3d8d
2 changed files with 5 additions and 1 deletions
|
|
@ -1064,6 +1064,10 @@ static void multi_getsock(struct Curl_easy *data,
|
|||
case MSTATE_PERFORMING:
|
||||
Curl_pollset_add_socks(data, ps, Curl_single_getsock);
|
||||
break;
|
||||
|
||||
case MSTATE_RATELIMITING:
|
||||
/* nothing to wait for */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Let connection filters add/remove as needed */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue