diff --git a/crates/net/src/client/runtime.rs b/crates/net/src/client/runtime.rs index 4832a6d..5c74675 100644 --- a/crates/net/src/client/runtime.rs +++ b/crates/net/src/client/runtime.rs @@ -1203,7 +1203,8 @@ pub const BACKLOG_STALL_MS: i32 = 1000; /// How many stalls the link may take before the session is failed for real. A /// hitch costs one and is recovered from; an authority that has genuinely gone /// away keeps earning them and fails once they add up. -pub const BACKLOG_STALLS_BEFORE_FAIL: u32 = 3; +pub const BACKLOG_STALLS_BEFORE_FAIL: u32 = + (master_protocol::SESSION_IDLE.as_millis() / BACKLOG_STALL_MS as u128) as u32 - 1; #[derive(Debug, Default)] pub struct BacklogStalls { diff --git a/crates/net/src/transport/master.rs b/crates/net/src/transport/master.rs index 44c8763..3cb3936 100644 --- a/crates/net/src/transport/master.rs +++ b/crates/net/src/transport/master.rs @@ -840,12 +840,15 @@ fn arm_master_browser( browser: Option>, mut commands: Commands, ) { + let MasterLaunchMode::Browser(browser_config) = &intent.0 else { + if browser.is_some() { + commands.remove_resource::(); + } + return; + }; if browser.is_some() { return; } - let MasterLaunchMode::Browser(browser_config) = &intent.0 else { - return; - }; let state = Arc::new(Mutex::new(MasterBrowserSnapshot { loading: true, have: browser_config.have,