mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Stop resize thread on first sender error
This commit is contained in:
parent
b050b125a9
commit
5dacfa10d5
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user