mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
De-async two things that shouldn't have been async to begin with.
This commit is contained in:
@@ -8,7 +8,7 @@ lazy_static! {
|
||||
static ref TEST_BUSY: Mutex<bool> = Mutex::new(false);
|
||||
}
|
||||
|
||||
pub async fn lqos_daht_test() -> BusResponse {
|
||||
pub fn lqos_daht_test() -> BusResponse {
|
||||
spawn_blocking(|| {
|
||||
if let Some(_lock) = TEST_BUSY.try_lock() {
|
||||
Command::new("/bin/ssh")
|
||||
|
||||
@@ -122,19 +122,11 @@ fn handle_bus_requests(requests: &[BusRequest], responses: &mut Vec<BusResponse>
|
||||
lqos_bus::BusResponse::Ack
|
||||
}
|
||||
BusRequest::UpdateLqosDTuning(..) => {
|
||||
let tokio_rt = tokio::runtime::Builder::new_current_thread()
|
||||
.enable_io()
|
||||
.build()
|
||||
.unwrap();
|
||||
tokio_rt.block_on(tuning::tune_lqosd_from_bus(&req))
|
||||
tuning::tune_lqosd_from_bus(&req)
|
||||
}
|
||||
#[cfg(feature = "equinix_tests")]
|
||||
BusRequest::RequestLqosEquinixTest => {
|
||||
let tokio_rt = tokio::runtime::Builder::new_current_thread()
|
||||
.enable_io()
|
||||
.build()
|
||||
.unwrap();
|
||||
tokio_rt.block_on(lqos_daht_test::lqos_daht_test())
|
||||
lqos_daht_test::lqos_daht_test()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ pub fn tune_lqosd_from_config_file(config: &LibreQoSConfig) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn tune_lqosd_from_bus(request: &BusRequest) -> BusResponse {
|
||||
pub fn tune_lqosd_from_bus(request: &BusRequest) -> BusResponse {
|
||||
match request {
|
||||
BusRequest::UpdateLqosDTuning(interval, tuning) => {
|
||||
// Real-time tuning changes. Probably dangerous.
|
||||
|
||||
Reference in New Issue
Block a user