feat(snownet): increase ICE timeout (#9569)

Some of our users are facing issues on what looks to be very unreliable
network connections. At present, we consider a connection dead if we
don't receive a response within 9.25 seconds. Cutting a connection and
re-establishing it _should_ not be a problem in general and TCP
connections happening through Firezone should resume gracefully. Further
work on whether that is actually the case is due in #9531. Until then,
we increase the ICE timeout to ~15s.

Related: #9526
This commit is contained in:
Thomas Eizinger
2025-06-19 00:16:32 +02:00
committed by GitHub
parent 6cd077cd18
commit c8a4a20818
2 changed files with 4 additions and 4 deletions

View File

@@ -2239,7 +2239,7 @@ fn new_agent() -> IceAgent {
}
fn apply_default_stun_timings(agent: &mut IceAgent) {
agent.set_max_stun_retransmits(8);
agent.set_max_stun_retransmits(12);
agent.set_max_stun_rto(Duration::from_millis(1500));
agent.set_initial_stun_rto(Duration::from_millis(250))
}
@@ -2282,7 +2282,7 @@ mod tests {
apply_default_stun_timings(&mut agent);
assert_eq!(agent.ice_timeout(), Duration::from_millis(9250))
assert_eq!(agent.ice_timeout(), Duration::from_millis(15250))
}
#[test]

View File

@@ -382,9 +382,9 @@ impl TunnelTest {
///
/// Consequently, this function needs to loop until no host can make progress at which point we consider the [`Transition`] complete.
///
/// At most, we will spend 10s of "simulation time" advancing the state.
/// At most, we will spend 20s of "simulation time" advancing the state.
fn advance(&mut self, ref_state: &ReferenceState, buffered_transmits: &mut BufferedTransmits) {
let cut_off = self.flux_capacitor.now::<Instant>() + Duration::from_secs(10);
let cut_off = self.flux_capacitor.now::<Instant>() + Duration::from_secs(20);
'outer: while self.flux_capacitor.now::<Instant>() < cut_off {
let now = self.flux_capacitor.now();