diff options
| author | David Lönnhager <david.l@mullvad.net> | 2023-09-11 20:39:29 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2023-09-19 17:37:25 +0200 |
| commit | 77369d414e6b8ddfe2cf955b47d5f81cdb151fb0 (patch) | |
| tree | 3ee417ccead7ea121b61a50b6e365d423df1ffca | |
| parent | 02764a83ab2c266bd0bca3c78e433d5f4d1d7f38 (diff) | |
| download | mullvadvpn-77369d414e6b8ddfe2cf955b47d5f81cdb151fb0.tar.xz mullvadvpn-77369d414e6b8ddfe2cf955b47d5f81cdb151fb0.zip | |
Temporarily disable macOS offline monitor debouncer. The DNS config suffers otherwise
| -rw-r--r-- | talpid-core/src/offline/macos.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/talpid-core/src/offline/macos.rs b/talpid-core/src/offline/macos.rs index 7263f9ab0f..7f13638ec9 100644 --- a/talpid-core/src/offline/macos.rs +++ b/talpid-core/src/offline/macos.rs @@ -6,17 +6,14 @@ //! in [`RouteManager`] using a `PF_ROUTE` socket. If there is no default route for neither IPv4 nor //! IPv6, the host is considered to be offline. use futures::{channel::mpsc::UnboundedSender, StreamExt}; -use std::{ - sync::{ - atomic::{AtomicBool, Ordering}, - Arc, Mutex, - }, - time::Duration, +use std::sync::{ + atomic::{AtomicBool, Ordering}, + Arc, Mutex, }; use talpid_routing::{DefaultRouteEvent, RouteManagerHandle}; /// How long to wait before announcing changes to the offline state -const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(2); +//const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(2); #[derive(err_derive::Error, Debug)] pub enum Error { @@ -124,7 +121,9 @@ pub async fn spawn_monitor( }; // Debounce event updates - tokio::time::sleep(DEBOUNCE_INTERVAL).await; + // FIXME: Debounce is disabled because the DNS config can get messed up + // when switching between networks otherwise. + //tokio::time::sleep(DEBOUNCE_INTERVAL).await; if prev_notified.swap(new_connectivity, Ordering::AcqRel) == new_connectivity { // We don't care about network changes here |
