tweaks and fixes
This commit is contained in:
19
src/main.rs
19
src/main.rs
@ -24,7 +24,10 @@ use satrs::{
|
||||
pus::event_man::EventRequestWithToken,
|
||||
};
|
||||
|
||||
use crate::{controller::ControllerPathCollection, tmtc::tm_sink::TmFunnelDynamic};
|
||||
use crate::{
|
||||
controller::ControllerPathCollection, interface::tcp_spp_client::ClientResult,
|
||||
tmtc::tm_sink::TmFunnelDynamic,
|
||||
};
|
||||
use crate::{controller::ExperimentController, pus::test::create_test_service};
|
||||
use crate::{
|
||||
events::EventHandler,
|
||||
@ -280,9 +283,17 @@ fn main() {
|
||||
.spawn(move || {
|
||||
info!("Running TCP SPP client");
|
||||
loop {
|
||||
let result = tcp_spp_client.operation();
|
||||
if let Err(e) = result {
|
||||
log::error!("TCP SPP client error: {}", e);
|
||||
match tcp_spp_client.operation() {
|
||||
Ok(result) => {
|
||||
// If the client connection was processed regularly, the read timeout takes
|
||||
// care of the sleep time.
|
||||
if result != ClientResult::Ok {
|
||||
std::thread::sleep(STOP_CHECK_FREQUENCY);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("TCP SPP client error: {}", e);
|
||||
}
|
||||
}
|
||||
if tcp_client_stop_signal.load(std::sync::atomic::Ordering::Relaxed) {
|
||||
break;
|
||||
|
Reference in New Issue
Block a user