Fix #794: Proper route request cache cleanup

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet
2026-03-25 11:07:41 +01:00
parent 14e7698910
commit 6f77b7cb83
+5 -4
View File
@@ -60,12 +60,13 @@ impl RouteRequestCache {
trace!("Cleaning route request cache");
cache.retain(|subnet, info: &mut RouteRequestInfo| {
if info.sent.elapsed() < expiration {
false
} else {
let elapsed = info.sent.elapsed() >= expiration;
if elapsed {
trace!(%subnet, "Removing exired route request from cache");
true
}
!elapsed
});
}
}