aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/wireguard.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-21 17:12:00 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-21 17:12:00 +0100
commitdee23969f5b1cfce7b352d6782a86cac062ec12e (patch)
tree15360be6307d32515f9d1be1efcba3dc470c42d9 /src/wireguard/wireguard.rs
parentClean dependencies and imports (diff)
downloadwireguard-rs-dee23969f5b1cfce7b352d6782a86cac062ec12e.tar.xz
wireguard-rs-dee23969f5b1cfce7b352d6782a86cac062ec12e.zip
Daemonization
Diffstat (limited to '')
-rw-r--r--src/wireguard/wireguard.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wireguard/wireguard.rs b/src/wireguard/wireguard.rs
index e548c8a..eb43512 100644
--- a/src/wireguard/wireguard.rs
+++ b/src/wireguard/wireguard.rs
@@ -16,7 +16,7 @@ use std::ops::Deref;
use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering};
use std::sync::Arc;
use std::thread;
-use std::time::{Duration, Instant, SystemTime};
+use std::time::{Duration, Instant};
use std::collections::hash_map::Entry;
use std::collections::HashMap;
@@ -219,7 +219,7 @@ impl<T: Tun, B: Bind> Wireguard<T, B> {
id: rng.gen(),
pk,
wg: self.state.clone(),
- walltime_last_handshake: Mutex::new(SystemTime::UNIX_EPOCH),
+ walltime_last_handshake: Mutex::new(None),
last_handshake_sent: Mutex::new(self.state.start - TIME_HORIZON),
handshake_queued: AtomicBool::new(false),
queue: Mutex::new(self.state.queue.lock().clone()),