fix(client): exit client-loop on empty message receive
@@ -16,7 +16,7 @@ use zellij_utils::{
command::TerminalAction,
get_mode_info,
},
- ipc::{ClientToServerMsg, IpcReceiverWithContext, ServerToClientMsg},
+ ipc::{ClientToServerMsg, ExitReason, IpcReceiverWithContext, ServerToClientMsg},
};
use crate::ClientId;
@@ -520,6 +520,13 @@ pub(crate) fn route_thread_main(
}
None => {
log::error!("Received empty message from client");
+ os_input.send_to_client(
+ client_id,
+ ServerToClientMsg::Exit(ExitReason::Error(
+ "Received empty message".to_string(),
+ )),
+ );
+ break;
}
}
}
