Don’t print error on EPIPE in vrps to stdout. (#807)

This commit suppresses the error message when the vrps command is outputting
the data set to stdout and receives a broken pipe error.
This commit is contained in:
Martin Hoffmann
2022-10-18 10:34:36 +02:00
committed by GitHub
parent 7e74832acc
commit 812aa6c9ee
+10 -4
View File
@@ -838,10 +838,16 @@ impl Vrps {
}
};
if let Err(err) = res {
error!(
"Failed to output result: {}",
err
);
// Surpress an error message for broken pipe on stdout.
if
self.output.is_some() ||
err.kind() != io::ErrorKind::BrokenPipe
{
error!(
"Failed to output result: {}",
err
);
}
Err(ExitError::Generic)
}
else if self.complete && !metrics.rsync_complete() {