Simplify expired route if check

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet committed 2024-07-02 11:24:00 +02:00
1 parent e05853c915
commit 5c2bb2d52c
1 file changed
+1 -3
+1 -3
View File
@@ -422,13 +422,11 @@ where
entry.set_metric(Metric::infinite());
entry.set_expires(tokio::time::Instant::now() + RETRACTED_ROUTE_HOLD_TIME);
entry.selected()
} else if entry.metric().is_infinite() {
} else {
debug!("Route {rk} expired, removing retracted route");
let selected = entry.selected();
entry.delete();
selected
} else {
unreachable!();
}
};