udp: request worker: use ValidUntil::new_with_now

This commit is contained in:
Joakim Frostegård 2021-11-27 18:12:19 +01:00
parent d565c6e046
commit b9bc5a2aa4
2 changed files with 2 additions and 3 deletions

View file

@ -121,10 +121,10 @@ pub fn run_request_worker(
}
if iter_counter % 128 == 0 {
peer_valid_until = ValidUntil::new(config.cleaning.max_peer_age);
let now = Instant::now();
peer_valid_until = ValidUntil::new_with_now(now, config.cleaning.max_peer_age);
if now > last_cleaning + cleaning_interval {
torrents.clean(&config, &state.access_list);