mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: set expiration duration properly (#7507)
This commit is contained in:
@ -1399,7 +1399,7 @@ impl Discv4Service {
|
||||
|
||||
fn evict_expired_requests(&mut self, now: Instant) {
|
||||
self.pending_enr_requests.retain(|_node_id, enr_request| {
|
||||
now.duration_since(enr_request.sent_at) < self.config.ping_expiration
|
||||
now.duration_since(enr_request.sent_at) < self.config.enr_expiration
|
||||
});
|
||||
|
||||
let mut failed_pings = Vec::new();
|
||||
@ -1698,7 +1698,7 @@ impl Discv4Service {
|
||||
// try resending buffered pings
|
||||
self.ping_buffered();
|
||||
|
||||
// evict expired nodes
|
||||
// evict expired requests
|
||||
while self.evict_expired_requests_interval.poll_tick(cx).is_ready() {
|
||||
self.evict_expired_requests(Instant::now());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user