release dashmap memory (#1485)

This commit is contained in:
Sijie.Sun
2025-10-18 12:48:04 +08:00
committed by GitHub
parent 8f1786fa23
commit cc8f35787e
29 changed files with 339 additions and 187 deletions
+1
View File
@@ -255,6 +255,7 @@ impl IcmpProxy {
loop {
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
nat_table.retain(|_, v| v.start_time.elapsed().as_secs() < 20);
nat_table.shrink_to_fit();
}
}
.instrument(tracing::info_span!("icmp proxy nat table cleaner")),