diff --git a/src/lib.rs b/src/lib.rs index 4630713..7805053 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,7 @@ mod utils; mod quic; use std::sync::Arc; +use std::sync::atomic::AtomicBool; use std::{sync::atomic::AtomicU8, time::Duration}; use std::net::{SocketAddr, ToSocketAddrs}; @@ -154,7 +155,7 @@ async fn parse_config(uuid: String, args: &CommandLine) -> Result { let node_conf = NodeConfig { name: args.name.to_owned(), - allow_routing: args.allow_routing, + allow_routing: AtomicBool::new(args.allow_routing), _drop_multicast: true, allow_p2p: args.allow_p2p, mtu: args.mtu,