diff options
author | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-22 16:59:12 +0530 |
---|---|---|
committer | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-22 22:19:50 +0530 |
commit | dbc446ab556c44aa62985728c26572011997ce98 (patch) | |
tree | 21a702bb710a1368755b6e6fd79a8817260d2268 /zellij-server | |
parent | fa0a7e05c384f0da1a6fe3dd240181a6ff528b58 (diff) |
fix regression and tests
Diffstat (limited to 'zellij-server')
-rw-r--r-- | zellij-server/src/lib.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/zellij-server/src/lib.rs b/zellij-server/src/lib.rs index c1f471c76..e598d2384 100644 --- a/zellij-server/src/lib.rs +++ b/zellij-server/src/lib.rs @@ -258,11 +258,12 @@ pub fn start_server(os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) { } ServerInstruction::Render(output) => { if *session_state.read().unwrap() == SessionState::Attached { - os_input.send_to_client( - output.map_or(ServerToClientMsg::Exit(ExitReason::Normal), |op| { - ServerToClientMsg::Render(op) - }), - ); + if let Some(op) = output { + os_input.send_to_client(ServerToClientMsg::Render(op)); + } else { + os_input.send_to_client(ServerToClientMsg::Exit(ExitReason::Normal)); + break; + } } } ServerInstruction::Error(backtrace) => { |