mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
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:
@@ -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]
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user