main: send error on invalid command

This commit is contained in:
Astro 2020-10-11 23:11:27 +02:00
parent aee279b579
commit 6ba1459a3c
1 changed files with 4 additions and 2 deletions

View File

@ -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(),
} }