diff --git a/src/config.rs b/src/config.rs index 4787320..383da24 100644 --- a/src/config.rs +++ b/src/config.rs @@ -29,7 +29,7 @@ pub struct Network { pub port: u16, pub address: String, pub remote_ip_header: Option, // retrieve client IP from this HTTP header if present - pub ping_interval: u32, + pub ping_interval_seconds: u32, } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -208,7 +208,7 @@ impl Default for Settings { }, network: Network { port: 8080, - ping_interval: 300, + ping_interval_seconds: 300, address: "0.0.0.0".to_owned(), remote_ip_header: None, }, diff --git a/src/server.rs b/src/server.rs index c5e11a1..8eb1f32 100644 --- a/src/server.rs +++ b/src/server.rs @@ -427,7 +427,7 @@ async fn nostr_server( let mut last_message_time = Instant::now(); // ping interval (every 5 minutes) - let default_ping_dur = Duration::from_secs(settings.network.ping_interval.into()); + let default_ping_dur = Duration::from_secs(settings.network.ping_interval_seconds.into()); // disconnect after 20 minutes without a ping response or event. let max_quiet_time = Duration::from_secs(60 * 20);