From 6b3b1a5966f6a65106abb2396384d6a038874afc Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Tue, 7 May 2024 21:22:01 -0400 Subject: [PATCH] Re-enable dirty echoes to hopefully mitigate #144 --- backend/src/api/handler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/api/handler.rs b/backend/src/api/handler.rs index dfc065a..83a2b9b 100644 --- a/backend/src/api/handler.rs +++ b/backend/src/api/handler.rs @@ -384,7 +384,7 @@ fn print_messages(msgs: &Vec) { impl ApiMessageHandler { pub fn process_forever(&mut self, settings: &mut Settings) { crate::utility::ioperm_power_ec(); - //let mut dirty_echo = true; // set everything twice, to make sure PowerTools wins on race conditions + let mut dirty_echo = true; // set everything twice, to make sure PowerTools wins on race conditions while let Ok(msg) = self.intake.recv() { let mut messages = vec![msg.to_string()]; // keep messages for logging let mut dirty = self.process(settings, msg); @@ -393,9 +393,9 @@ impl ApiMessageHandler { dirty |= self.process(settings, msg); } if dirty - /*|| dirty_echo */ + || dirty_echo { - //dirty_echo = dirty; // echo only once + dirty_echo = dirty; // echo only once print_messages(&messages); // run on_set if let Err(e) = settings.on_set() {