warning cleanup (#3759)

This commit is contained in:
Yeastplume
2024-01-29 09:23:38 +00:00
committed by GitHub
parent a9f45dee2b
commit d1b7ae5352
7 changed files with 45 additions and 16 deletions
+1 -1
View File
@@ -437,7 +437,7 @@ impl Peers {
// Delete defunct peers from storage
let _ = self.store.delete_peers(|peer| {
let diff = now - Utc.timestamp(peer.last_connected, 0);
let diff = now - Utc.timestamp_opt(peer.last_connected, 0).unwrap();
let should_remove = peer.flags == State::Defunct
&& diff > Duration::seconds(global::PEER_EXPIRATION_REMOVE_TIME);