From cbcb6277720173484468c51919c175ca5d9a9901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Wed, 13 Apr 2022 22:32:30 +0200 Subject: [PATCH] udp: reorder initializations in lib.rs --- aquatic_udp/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/aquatic_udp/src/lib.rs b/aquatic_udp/src/lib.rs index 864104e..80ba09f 100644 --- a/aquatic_udp/src/lib.rs +++ b/aquatic_udp/src/lib.rs @@ -26,17 +26,15 @@ pub const APP_NAME: &str = "aquatic_udp: UDP BitTorrent tracker"; pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION"); pub fn run(config: Config) -> ::anyhow::Result<()> { - let state = State::new(config.request_workers); - - update_access_list(&config.access_list, &state.access_list)?; - let mut signals = Signals::new([SIGUSR1, SIGTERM])?; + let state = State::new(config.request_workers); let connection_validator = ConnectionValidator::new(&config)?; - let (sentinel_watcher, sentinel) = PanicSentinelWatcher::create_with_sentinel(); let priv_dropper = PrivilegeDropper::new(config.privileges.clone(), config.socket_workers); + update_access_list(&config.access_list, &state.access_list)?; + let mut request_senders = Vec::new(); let mut request_receivers = BTreeMap::new();