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();
|
SCB::sys_reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(SessionInput::Error(e)) =>
|
Ok(SessionInput::Error(e)) => {
|
||||||
error!("session input: {:?}", e),
|
error!("session input: {:?}", e);
|
||||||
|
send_line(&mut socket, b"{ \"error\": \"invalid input\" }");
|
||||||
|
}
|
||||||
Err(_) =>
|
Err(_) =>
|
||||||
socket.close(),
|
socket.close(),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user