Skip to content

Commit

Permalink
Add warning log for max number of pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Nov 13, 2024
1 parent e4b9922 commit 1ddfecf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ice/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,12 @@ impl IceAgent {
//
// TODO: How does this work with trickle ice?
let max = self.max_candidate_pairs.unwrap_or(100);

let num_pairs = self.candidate_pairs.len();
if num_pairs > max {
warn!(%max, %num_pairs, "Exceeding max number of candidate pairs");
}

while self.candidate_pairs.len() > max {
let pair = self.candidate_pairs.pop();
debug!("Remove overflow pair {:?}", pair);
Expand Down

0 comments on commit 1ddfecf

Please sign in to comment.