summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2024-12-17 08:39:39 +0100
committerDavid Lönnhager <david.l@mullvad.net>2024-12-18 09:44:18 +0100
commite84c2917760d890465031e48bc5a716dc857cd48 (patch)
tree1a63fd4596c7ee8c67caafbce10f143a72255567
parent3a7b1fbbd6b4409a45146b6a44420158e9dc0508 (diff)
downloadmullvadvpn-e84c2917760d890465031e48bc5a716dc857cd48.tar.xz
mullvadvpn-e84c2917760d890465031e48bc5a716dc857cd48.zip
Reset connection monitor state and timeout between each ping attempt
-rw-r--r--talpid-wireguard/src/connectivity/check.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/talpid-wireguard/src/connectivity/check.rs b/talpid-wireguard/src/connectivity/check.rs
index 702ce97f2d..508e8cff63 100644
--- a/talpid-wireguard/src/connectivity/check.rs
+++ b/talpid-wireguard/src/connectivity/check.rs
@@ -125,6 +125,8 @@ impl<S: Strategy> Check<S> {
// checks if the tunnel has ever worked. Intended to check if a connection to a tunnel is
// successful at the start of a connection.
pub fn establish_connectivity(&mut self, tunnel_handle: &TunnelType) -> Result<bool, Error> {
+ self.conn_state = ConnState::new(Instant::now(), Default::default());
+
// Send initial ping to prod WireGuard into connecting.
self.ping_state
.pinger