Stop resize thread on first sender error

This commit is contained in:
Alexandre Bury 2021-03-30 16:07:41 -07:00
parent b050b125a9
commit 5dacfa10d5

View File

@ -17,7 +17,9 @@ pub fn start_resize_thread(
while resize_running.load(Ordering::Relaxed) { while resize_running.load(Ordering::Relaxed) {
// We know it will only contain SIGWINCH signals, so no need to check. // We know it will only contain SIGWINCH signals, so no need to check.
if signals.wait().count() > 0 { if signals.wait().count() > 0 {
resize_sender.send(()).unwrap(); if resize_sender.send(()).is_err() {
return;
}
} }
} }
}); });