diff options
| author | David Lönnhager <david.l@mullvad.net> | 2024-03-13 17:51:30 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-03-13 17:51:30 +0100 |
| commit | 9760ca141281a826933ba14f73c8fb0571f444ef (patch) | |
| tree | 6435d9d05c136970a2d70a2cd09397cff01b39cf | |
| parent | 3f0691cf8b1ca9d8fbb988d3d81fcfe927a305b8 (diff) | |
| parent | 2745f3483ccefcc08a317a2127727ea9159f5986 (diff) | |
| download | mullvadvpn-9760ca141281a826933ba14f73c8fb0571f444ef.tar.xz mullvadvpn-9760ca141281a826933ba14f73c8fb0571f444ef.zip | |
Merge branch 'fix-handle-wg-go-shutdown' into main
| -rw-r--r-- | talpid-wireguard/src/connectivity_check.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/talpid-wireguard/src/connectivity_check.rs b/talpid-wireguard/src/connectivity_check.rs index a515ff5c6b..e820a3eb73 100644 --- a/talpid-wireguard/src/connectivity_check.rs +++ b/talpid-wireguard/src/connectivity_check.rs @@ -217,7 +217,14 @@ impl ConnectivityMonitor { .lock() .ok()? .as_ref() - .map(|tunnel| tunnel.get_tunnel_stats().map_err(Error::ConfigReadError)) + .and_then(|tunnel| match tunnel.get_tunnel_stats() { + Ok(stats) if stats.is_empty() => { + log::error!("Tunnel unexpectedly shut down"); + None + } + Ok(stats) => Some(Ok(stats)), + Err(error) => Some(Err(Error::ConfigReadError(error))), + }) } fn maybe_send_ping(&mut self, now: Instant) -> Result<(), Error> { |
