fix(client): exit client-loop on empty message receive (#1454)
This commit is contained in:
parent
e75b8da1ff
commit
496196214a
1 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue