From 367002357f641fab138a8647d00e2ac7ccee16f3 Mon Sep 17 00:00:00 2001 From: topquark12 Date: Thu, 7 Jan 2021 17:28:12 +0800 Subject: [PATCH] main: save does not hang, just does not report save success --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6823992..571d04f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -399,7 +399,9 @@ fn main() -> ! { if channel.is_none() || channel == Some(c) { let config = ChannelConfig::new(&mut channels, c); match store.write_value(CHANNEL_CONFIG_KEY[c], &config, &mut store_value_buf) { - Ok(()) => {} + Ok(()) => { + send_line(&mut socket, b"{}"); + } Err(e) => { error!("unable to save channel {} config to flash: {:?}", c, e); let _ = writeln!(socket, "{{\"error\":\"{:?}\"}}", e);