mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
udp: request workers: use config.statistics.active()
This commit is contained in:
parent
7c57548565
commit
29ea935744
1 changed files with 2 additions and 2 deletions
|
|
@ -221,7 +221,7 @@ pub fn run_request_worker(
|
||||||
if now > last_cleaning + cleaning_interval {
|
if now > last_cleaning + cleaning_interval {
|
||||||
torrents.clean(&config, &state.access_list);
|
torrents.clean(&config, &state.access_list);
|
||||||
|
|
||||||
if !statistics_update_interval.is_zero() {
|
if config.statistics.active() {
|
||||||
let peers_ipv4 = torrents.ipv4.values().map(|t| t.peers.len()).sum();
|
let peers_ipv4 = torrents.ipv4.values().map(|t| t.peers.len()).sum();
|
||||||
let peers_ipv6 = torrents.ipv6.values().map(|t| t.peers.len()).sum();
|
let peers_ipv6 = torrents.ipv6.values().map(|t| t.peers.len()).sum();
|
||||||
|
|
||||||
|
|
@ -233,7 +233,7 @@ pub fn run_request_worker(
|
||||||
|
|
||||||
last_cleaning = now;
|
last_cleaning = now;
|
||||||
}
|
}
|
||||||
if !statistics_update_interval.is_zero()
|
if config.statistics.active()
|
||||||
&& now > last_statistics_update + statistics_update_interval
|
&& now > last_statistics_update + statistics_update_interval
|
||||||
{
|
{
|
||||||
state.statistics_ipv4.torrents[worker_index.0]
|
state.statistics_ipv4.torrents[worker_index.0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue