aquatic_udp: split cleaning interval for connections and torrents

This commit is contained in:
Joakim Frostegård 2021-11-03 00:07:52 +01:00
parent 5f10e5e7f4
commit afe3e2465f
5 changed files with 20 additions and 13 deletions

View file

@ -88,7 +88,9 @@ pub fn run_socket_worker(
if iter_counter % 32 == 0 {
let now = Instant::now();
if last_cleaning + Duration::from_secs(config.cleaning.interval) > now {
if last_cleaning + Duration::from_secs(config.cleaning.connection_cleaning_interval)
> now
{
connections.clean();
last_cleaning = now;