diff options
| -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 |
