Fix too many 429 response (#1231)

Fixed #1229

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-08-08 10:53:15 +10:00 committed by GitHub
parent e4c776f403
commit 435df675b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 228 additions and 132 deletions

View file

@ -4,7 +4,6 @@ use std::{
future::Future,
path::{Path, PathBuf},
sync::Arc,
time::Duration,
};
use binstalk::{
@ -100,7 +99,7 @@ pub fn install_crates(
let client = Client::new(
concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")),
args.min_tls_version.map(|v| v.into()),
Duration::from_millis(rate_limit.duration.get()),
rate_limit.duration,
rate_limit.request_count,
read_root_certs(
args.root_certificates,