mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Refactor AccessList; update it periodically in aquatic_udp glommio
This commit is contained in:
parent
cad3618fad
commit
38617c70f4
18 changed files with 141 additions and 77 deletions
|
|
@ -2,7 +2,7 @@ use std::net::{IpAddr, SocketAddr};
|
|||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
|
||||
use aquatic_common::access_list::AccessList;
|
||||
use aquatic_common::access_list::{AccessList, AccessListArcSwap};
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use hashbrown::HashMap;
|
||||
use indexmap::IndexMap;
|
||||
|
|
@ -136,7 +136,7 @@ impl TorrentMaps {
|
|||
|
||||
#[derive(Clone)]
|
||||
pub struct State {
|
||||
pub access_list: Arc<AccessList>,
|
||||
pub access_list: Arc<AccessListArcSwap>,
|
||||
pub torrent_maps: Arc<Mutex<TorrentMaps>>,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue