diff options
author | Aram Drevekenin <aram@poor.dev> | 2022-11-23 09:31:50 +0100 |
---|---|---|
committer | Aram Drevekenin <aram@poor.dev> | 2022-11-23 09:31:50 +0100 |
commit | 7eb1e3b940562279d7c530944e85459c471236de (patch) | |
tree | 1e37d74dc87f1aece50d0357c4216dc561130d70 | |
parent | 8b50ef96f34faacdd75642c5e5844904827b333c (diff) |
fix(router): handle client empty message
-rw-r--r-- | zellij-server/src/route.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/zellij-server/src/route.rs b/zellij-server/src/route.rs index 0c8417128..0e83a13c3 100644 --- a/zellij-server/src/route.rs +++ b/zellij-server/src/route.rs @@ -795,15 +795,16 @@ pub(crate) fn route_thread_main( } }, None => { + log::error!("Received empty message from client, logging client out."); let _ = os_input.send_to_client( client_id, ServerToClientMsg::Exit(ExitReason::Error( "Received empty message".to_string(), )), ); - - return Err(anyhow!("received empty message from client")) - .with_context(err_context); + let _ = to_server + .send(ServerInstruction::RemoveClient(client_id)); + break 'route_loop; }, } } |