main: save does not hang, just does not report save success

This commit is contained in:
topquark12 2021-01-07 17:28:12 +08:00
parent 73dd6d9154
commit 367002357f

View File

@ -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);