From 2bc0095d5667f36a5a6eb953bb0377ed6ce5fd4e Mon Sep 17 00:00:00 2001 From: Alper Cugun Date: Wed, 22 Mar 2023 14:53:38 +0100 Subject: [PATCH] Increase timeout duration This webservice seems to be under fairly heavy pressure and a 5 second timeout will make this request fail most of the time. Because this request is only made once I don't see any harm in setting the timeout to 30 seconds. --- ch_02/tricoder/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch_02/tricoder/src/main.rs b/ch_02/tricoder/src/main.rs index 119fa98d..cdd1c61a 100644 --- a/ch_02/tricoder/src/main.rs +++ b/ch_02/tricoder/src/main.rs @@ -19,7 +19,7 @@ fn main() -> Result<(), anyhow::Error> { let target = args[1].as_str(); - let http_timeout = Duration::from_secs(5); + let http_timeout = Duration::from_secs(30); let http_client = Client::builder() .redirect(redirect::Policy::limited(4)) .timeout(http_timeout)