Do not unwrap the oldest IP in QUIC connectiont table (#26272)
This commit is contained in:
parent
9765034e04
commit
31d870fe1b
|
@ -421,10 +421,16 @@ impl ConnectionTable {
|
|||
}
|
||||
}
|
||||
}
|
||||
if let Some(removed) = self.table.remove(&oldest_ip.unwrap()) {
|
||||
if let Some(oldest_ip) = oldest_ip {
|
||||
if let Some(removed) = self.table.remove(&oldest_ip) {
|
||||
self.total_size -= removed.len();
|
||||
num_pruned += removed.len();
|
||||
}
|
||||
} else {
|
||||
// No valid entries in the table with an IP address. Continuing the loop will cause
|
||||
// infinite looping.
|
||||
break;
|
||||
}
|
||||
}
|
||||
num_pruned
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue