Skip to content

Commit

Permalink
fix: increase abandoned timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
piot committed Apr 15, 2024
1 parent 15bbc9b commit 53a757b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl RoomConfig {
}
}

const ABANDONED_TIMEOUT: Duration = Duration::from_secs(2);
const ABANDONED_TIMEOUT: Duration = Duration::from_secs(15 * 60);

/// Contains the Room [Connection]s as well the appointed Leader.
#[derive(Debug)]
Expand Down Expand Up @@ -474,9 +474,11 @@ mod tests {
let connection_id = room.create_connection(now);
assert_eq!(room.connections.len(), 1);
assert_eq!(connection_id.value(), 1);
assert_eq!(room.leader_index, Some(connection_id));

room.destroy_connection(connection_id);
assert_eq!(room.connections.len(), 0);
assert_eq!(room.leader_index, None);
}

#[test]
Expand Down

0 comments on commit 53a757b

Please sign in to comment.