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 | |
| parent | Add ability to attach to sessions (diff) | |
| download | sl0ppij-dbc446ab556c44aa62985728c26572011997ce98.tar.gz sl0ppij-dbc446ab556c44aa62985728c26572011997ce98.tar.xz sl0ppij-dbc446ab556c44aa62985728c26572011997ce98.zip | |
fix regression and tests
| -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 c1f471c7..e598d238 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) => { |
