mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
udp: request worker: use ValidUntil::new_with_now
This commit is contained in:
parent
d565c6e046
commit
b9bc5a2aa4
2 changed files with 2 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue