summaryrefslogtreecommitdiffstats
path: root/zellij-client/src
diff options
context:
space:
mode:
authorraphCode <15750438+raphCode@users.noreply.github.com>2022-06-21 20:40:26 +0200
committerGitHub <noreply@github.com>2022-06-21 20:40:26 +0200
commit5d9c428294dd320db0b72257cb5e2c655f954267 (patch)
tree856c25d306d8708146a3bb109bd9d54ee2a0ea50 /zellij-client/src
parent29332ca68490e907b7b9159d41b1a90efbe5c8a1 (diff)
fix: exit client on empty rcv (#1535)
* Exit client on empty ipc receive This resolves a hang when the server goes away unnoticed (e.g. when it is killed). In some cases, this delayed system shutdown because the client did not react to systemd's SIGTERM. * Add newline after error report to tidy up shell prompt * Update changelog
Diffstat (limited to 'zellij-client/src')
-rw-r--r--zellij-client/src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/zellij-client/src/lib.rs b/zellij-client/src/lib.rs
index 0afbe913b..aeb74abba 100644
--- a/zellij-client/src/lib.rs
+++ b/zellij-client/src/lib.rs
@@ -297,6 +297,12 @@ pub fn start_client(
.send(ClientInstruction::UnblockInputThread)
.unwrap();
log::error!("Received empty message from server");
+ send_client_instructions
+ .send(ClientInstruction::Error(
+ "Received empty message from server".to_string(),
+ ))
+ .unwrap();
+ break;
},
}
}
@@ -309,7 +315,7 @@ pub fn start_client(
let restore_snapshot = "\u{1b}[?1049l";
os_input.disable_mouse();
let error = format!(
- "{}\n{}{}",
+ "{}\n{}{}\n",
restore_snapshot, goto_start_of_last_line, backtrace
);
let _ = os_input