From a941bbd0c9dfd2dd804780658f17c4f6e154efe2 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 24 Feb 2021 11:55:37 +0100 Subject: [PATCH] client: raise HTTP_TIMEOUT to 120s MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As 20s is really not that high, especially for loaded setups one is connected to through a spotty network (looking at you ÖBB railnet) and gets latency spikes of 5 - 10s for some minutes at a time.. Signed-off-by: Thomas Lamprecht --- src/client/http_client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 9fd1c013..76ab0391 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -30,8 +30,8 @@ use crate::tools::{ }; /// Timeout used for several HTTP operations that are expected to finish quickly but may block in -/// certain error conditions. -const HTTP_TIMEOUT: Duration = Duration::from_secs(20); +/// certain error conditions. Keep it generous, to avoid false-positive under high load. +const HTTP_TIMEOUT: Duration = Duration::from_secs(2 * 60); #[derive(Clone)] pub struct AuthInfo { -- 2.39.2