mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
http and ws: rename cleaning.interval to torrent_cleaning_interval
This commit is contained in:
parent
afe3e2465f
commit
8871d0eec8
6 changed files with 12 additions and 11 deletions
|
|
@ -59,7 +59,7 @@ pub struct ProtocolConfig {
|
|||
#[serde(default)]
|
||||
pub struct CleaningConfig {
|
||||
/// Clean peers this often (seconds)
|
||||
pub interval: u64,
|
||||
pub torrent_cleaning_interval: u64,
|
||||
/// Remove peers that haven't announced for this long (seconds)
|
||||
pub max_peer_age: u64,
|
||||
}
|
||||
|
|
@ -106,7 +106,7 @@ impl Default for ProtocolConfig {
|
|||
impl Default for CleaningConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
interval: 30,
|
||||
torrent_cleaning_interval: 30,
|
||||
max_peer_age: 1800,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ pub async fn run_request_worker(
|
|||
enclose!((config, torrents, access_list) move || async move {
|
||||
torrents.borrow_mut().clean(&config, &access_list);
|
||||
|
||||
Some(Duration::from_secs(config.cleaning.interval))
|
||||
Some(Duration::from_secs(config.cleaning.torrent_cleaning_interval))
|
||||
})()
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,9 @@ async fn remove_closed_connections(
|
|||
}
|
||||
}
|
||||
|
||||
Some(Duration::from_secs(config.cleaning.interval))
|
||||
Some(Duration::from_secs(
|
||||
config.cleaning.torrent_cleaning_interval,
|
||||
))
|
||||
}
|
||||
|
||||
async fn receive_out_messages(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue