From f0cadb20c1a6f3cddf8923a7cd1acbc704f2677e Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 22 Nov 2022 11:10:08 +0100 Subject: [PATCH] Revert "Rename http_fetch_retry_limit to http_fetch_limit (was misleading)" This reverts commit dc32b0e94e34490a3f45252e17634b73275cc7e9. --- src/lib.rs | 2 +- src/utils.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 984ed72..5d641ab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,7 +36,7 @@ clone_trait_object!(UrlVerifier); pub struct InstanceSettings { /// Maximum number of outgoing HTTP requests per incoming activity #[builder(default = "20")] - http_fetch_limit: i32, + http_fetch_retry_limit: i32, /// Number of worker threads for sending outgoing activities #[builder(default = "64")] worker_count: u64, diff --git a/src/utils.rs b/src/utils.rs index 52ad639..45e4037 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -15,7 +15,7 @@ pub async fn fetch_object_http( info!("Fetching remote object {}", url.to_string()); *request_counter += 1; - if *request_counter > instance.settings.http_fetch_limit { + if *request_counter > instance.settings.http_fetch_retry_limit { return Err(Error::RequestLimit); }