From 0920c86de3523785b5f4ac67e2090f0736f9fcb2 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Wed, 28 Feb 2024 19:05:49 +0100 Subject: Closes #18. Added pingthreshold. Cargo update --- src/config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 4319ffc..58043c2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -7,6 +7,7 @@ pub struct Config { pub apikey: String, pub serveraddr: String, pub pingtimeout: i64, + pub pingthreshold: i64, } impl Config { @@ -14,6 +15,7 @@ impl Config { let config = config::Config::builder() .set_default("serveraddr", "0.0.0.0:7229")? .set_default("pingtimeout", 10)? + .set_default("pingthreshold", 1)? .add_source(File::with_name("config.toml").required(false)) .add_source(File::with_name("config.dev.toml").required(false)) .add_source(config::Environment::with_prefix("WEBOL").prefix_separator("_")) @@ -22,4 +24,3 @@ impl Config { config.try_deserialize() } } - -- cgit v1.2.3