main: send error on invalid command

This commit is contained in:
Astro 2020-10-11 23:11:27 +02:00
parent aee279b579
commit 6ba1459a3c

View File

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