hotfix! re-enable nebula thread on tfclient
This commit is contained in:
parent
a2a94ad801
commit
bce97ffe0b
|
@ -6,7 +6,7 @@ use std::thread;
|
|||
use crate::apiworker::{apiworker_main, APIWorkerMessage};
|
||||
use crate::config::load_config;
|
||||
|
||||
use crate::nebulaworker::NebulaWorkerMessage;
|
||||
use crate::nebulaworker::{NebulaWorkerMessage, nebulaworker_main};
|
||||
use crate::socketworker::{socketworker_main, SocketWorkerMessage};
|
||||
use crate::timerworker::{timer_main, TimerWorkerMessage};
|
||||
use crate::util::check_server_url;
|
||||
|
@ -28,7 +28,7 @@ pub fn daemon_main(name: String, server: String) {
|
|||
|
||||
let (tx_api, rx_api) = mpsc::channel::<APIWorkerMessage>();
|
||||
let (tx_socket, rx_socket) = mpsc::channel::<SocketWorkerMessage>();
|
||||
let (tx_nebula, _rx_nebula) = mpsc::channel::<NebulaWorkerMessage>();
|
||||
let (tx_nebula, rx_nebula) = mpsc::channel::<NebulaWorkerMessage>();
|
||||
let (tx_timer, rx_timer) = mpsc::channel::<TimerWorkerMessage>();
|
||||
|
||||
let transmitter = ThreadMessageSender {
|
||||
|
@ -108,12 +108,12 @@ pub fn daemon_main(name: String, server: String) {
|
|||
});
|
||||
|
||||
info!("Starting Nebula thread...");
|
||||
let _config_nebula = config.clone();
|
||||
let _transmitter_nebula = transmitter.clone();
|
||||
let _name_nebula = name.clone();
|
||||
//let nebula_thread = thread::spawn(move || {
|
||||
// nebulaworker_main(config_nebula, name_nebula, transmitter_nebula, rx_nebula);
|
||||
//});
|
||||
let config_nebula = config.clone();
|
||||
let transmitter_nebula = transmitter.clone();
|
||||
let name_nebula = name.clone();
|
||||
let nebula_thread = thread::spawn(move || {
|
||||
nebulaworker_main(config_nebula, name_nebula, transmitter_nebula, rx_nebula);
|
||||
});
|
||||
|
||||
info!("Starting socket worker thread...");
|
||||
let name_socket = name;
|
||||
|
@ -163,13 +163,13 @@ pub fn daemon_main(name: String, server: String) {
|
|||
info!("API thread exited");
|
||||
|
||||
info!("Waiting for Nebula thread to exit...");
|
||||
//match nebula_thread.join() {
|
||||
// Ok(_) => (),
|
||||
// Err(_) => {
|
||||
// error!("Error waiting for nebula thread to exit.");
|
||||
// std::process::exit(1);
|
||||
// }
|
||||
//}
|
||||
match nebula_thread.join() {
|
||||
Ok(_) => (),
|
||||
Err(_) => {
|
||||
error!("Error waiting for nebula thread to exit.");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
info!("Nebula thread exited");
|
||||
|
||||
info!("All threads exited");
|
||||
|
|
Loading…
Reference in New Issue