mirror of
https://github.com/vladtrc/iw4L
synced 2026-10-26 02:11:39 -04:00
Keep relayed matches through short link loss; stop browser polling in a lobby
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -840,12 +840,15 @@ fn arm_master_browser(
|
||||
browser: Option<Res<MasterBrowser>>,
|
||||
mut commands: Commands,
|
||||
) {
|
||||
let MasterLaunchMode::Browser(browser_config) = &intent.0 else {
|
||||
if browser.is_some() {
|
||||
commands.remove_resource::<MasterBrowser>();
|
||||
}
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user