From 5f6c596a129e395d92046d6186ea60dcfa14f3d6 Mon Sep 17 00:00:00 2001 From: core Date: Thu, 30 Mar 2023 20:28:13 -0400 Subject: [PATCH] bugfix --- Cargo.lock | 2 +- tfclient/Cargo.toml | 2 +- tfclient/src/daemon.rs | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 34f9b03..a072344 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2480,7 +2480,7 @@ dependencies = [ [[package]] name = "tfclient" -version = "0.1.3" +version = "0.1.4" dependencies = [ "base64 0.21.0", "base64-serde", diff --git a/tfclient/Cargo.toml b/tfclient/Cargo.toml index cf20fdc..487798d 100644 --- a/tfclient/Cargo.toml +++ b/tfclient/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfclient" -version = "0.1.3" +version = "0.1.4" edition = "2021" description = "An open-source reimplementation of a Defined Networking-compatible client" license = "GPL-3.0-or-later" diff --git a/tfclient/src/daemon.rs b/tfclient/src/daemon.rs index 6cbba58..6c9e2c2 100644 --- a/tfclient/src/daemon.rs +++ b/tfclient/src/daemon.rs @@ -94,6 +94,14 @@ pub fn daemon_main(name: String, server: String) { nebulaworker_main(config_nebula, name_nebula, transmitter_nebula, rx_nebula); }); + info!("Starting socket worker thread..."); + let name_socket = name.clone(); + let config_socket = config.clone(); + let tx_socket = transmitter.clone(); + let socket_thread = thread::spawn(move || { + socketworker_main(config_socket, name_socket, tx_socket, rx_socket); + }); + info!("Starting timer thread..."); if !config.disable_automatic_config_updates { let timer_transmitter = transmitter.clone(); @@ -113,12 +121,6 @@ pub fn daemon_main(name: String, server: String) { info!("automatic config updates have been disabled - not starting timer thread"); } - info!("Starting socket worker thread..."); - let name_socket = name.clone(); - let socket_thread = thread::spawn(move || { - socketworker_main(config, name_socket, transmitter, rx_socket); - }); - info!("Waiting for socket thread to exit..."); match socket_thread.join() { Ok(_) => (),