core: mute all BrokenPipe errors

On windows the error message does not contain `Broken pipe`, so let's
try to find the error `kind` which should be `BrokenPipe` in all cases.
This commit is contained in:
Michael Debertol 2021-06-16 12:28:50 +02:00
parent 816c55dce4
commit b87387964d

View file

@ -8,7 +8,7 @@ pub fn mute_sigpipe_panic() {
let hook = panic::take_hook();
panic::set_hook(Box::new(move |info| {
if let Some(res) = info.payload().downcast_ref::<String>() {
if res.contains("Broken pipe") {
if res.contains("BrokenPipe") {
return;
}
}