forked from M-Labs/thermostat
main: send error on invalid command
This commit is contained in:
parent
aee279b579
commit
6ba1459a3c
|
@ -373,8 +373,10 @@ fn main() -> ! {
|
|||
SCB::sys_reset();
|
||||
}
|
||||
}
|
||||
Ok(SessionInput::Error(e)) =>
|
||||
error!("session input: {:?}", e),
|
||||
Ok(SessionInput::Error(e)) => {
|
||||
error!("session input: {:?}", e);
|
||||
send_line(&mut socket, b"{ \"error\": \"invalid input\" }");
|
||||
}
|
||||
Err(_) =>
|
||||
socket.close(),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue