From 351b3e8a57c9e0143b7b6f3ed2160dcdce00225e Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 18 Sep 2023 08:39:19 +0100 Subject: Add connect timeout and overall timeout (#1238) * Add connect timeout and overall timeout * Make it configurable * Fix test * Add docs --- atuin-client/src/settings.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'atuin-client/src/settings.rs') diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs index e2d22e93..e49ab0cb 100644 --- a/atuin-client/src/settings.rs +++ b/atuin-client/src/settings.rs @@ -176,6 +176,9 @@ pub struct Settings { pub workspaces: bool, pub ctrl_n_shortcuts: bool, + pub network_connect_timeout: u64, + pub network_timeout: u64, + // This is automatically loaded when settings is created. Do not set in // config! Keep secrets and settings apart. pub session_token: String, @@ -372,6 +375,8 @@ impl Settings { .set_default("workspaces", false)? .set_default("ctrl_n_shortcuts", false)? .set_default("secrets_filter", true)? + .set_default("network_connect_timeout", 5)? + .set_default("network_timeout", 30)? .add_source( Environment::with_prefix("atuin") .prefix_separator("_") -- cgit v1.3.1