mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
aquatic_udp: pass less of state to tasks::update_access_list
This commit is contained in:
parent
253497bb74
commit
6b8616acf9
2 changed files with 5 additions and 4 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use std::sync::Arc;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
use histogram::Histogram;
|
||||
|
|
@ -7,10 +8,10 @@ use aquatic_common::access_list::AccessListMode;
|
|||
use crate::common::*;
|
||||
use crate::config::Config;
|
||||
|
||||
pub fn update_access_list(config: &Config, state: &State) {
|
||||
pub fn update_access_list(config: &Config, access_list: &Arc<AccessList>) {
|
||||
match config.access_list.mode {
|
||||
AccessListMode::White | AccessListMode::Black => {
|
||||
if let Err(err) = state.access_list.update_from_path(&config.access_list.path) {
|
||||
if let Err(err) = access_list.update_from_path(&config.access_list.path) {
|
||||
::log::error!("Update access list from path: {:?}", err);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue