logger loop must never exit, handle exit message with panic

This commit is contained in:
bunnie 2026-05-09 16:31:12 +08:00
parent 0f1cae49f0
commit f12996a1ab

View file

@ -25,7 +25,7 @@ impl Output {
loop {
match self.rx.recv_timeout(std::time::Duration::from_millis(50)) {
Ok(msg) => match msg {
ControlMessage::Exit => break,
ControlMessage::Exit => panic!("Logger exit reached"),
ControlMessage::Text(s) => print!("{}", s),
ControlMessage::Byte(s) => {
let mut handle = self.stdout.lock();