diff --git a/src/main.rs b/src/main.rs index caf3b78..c4e65c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -578,7 +578,7 @@ impl State { // if peer is connected and endpoint is the correct one, // set higher keepalive and then skip reconfiguring it - if !bad_endpoint && now < peer.last_seen + TIMEOUT.as_secs() { + if !bad_endpoint && peer.last_seen != u64::MAX && now < peer.last_seen + TIMEOUT.as_secs() { Command::new("wg") .args([ "set",