mirror of
https://github.com/threefoldtech/mycelium.git
synced 2026-10-22 13:41:15 +00:00
Simplify expired route if check
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
1 file changed
+1
-3
@@ -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!();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user