aquatic_ws: clean torrent state periodically

This commit is contained in:
Joakim Frostegård 2020-05-12 15:45:28 +02:00
parent de06931242
commit 7c9ecda53a
5 changed files with 41 additions and 11 deletions

View file

@ -82,6 +82,7 @@ impl Default for TorrentData {
pub type TorrentMap = HashMap<InfoHash, TorrentData>;
#[derive(Clone)]
pub struct State {
pub torrents: Arc<Mutex<TorrentMap>>,
}