mirror of
https://github.com/fluencelabs/kademlia-exporter
synced 2025-04-24 13:52:13 +00:00
src/exporter/node_store: Fix garbage collection
This commit is contained in:
parent
8d90004ebf
commit
0f18a40bb8
@ -42,7 +42,7 @@ impl NodeStore {
|
||||
// Remove old offline nodes.
|
||||
let length = self.nodes.len();
|
||||
self.nodes
|
||||
.retain(|_, n| (Instant::now() - n.last_seen) > Duration::from_secs(60 * 60 * 24));
|
||||
.retain(|_, n| (Instant::now() - n.last_seen) < Duration::from_secs(60 * 60 * 24));
|
||||
self.metrics
|
||||
.meta_offline_nodes_removed
|
||||
.with_label_values(&[&self.dht])
|
||||
|
Loading…
x
Reference in New Issue
Block a user