dont warn or error for EPIPE errno's

pull/3019/head
Andrew Bauer 2020-08-18 09:30:06 -05:00
parent 1627b1d0d1
commit 62d687adfa
2 changed files with 4 additions and 3 deletions

View File

@ -842,7 +842,8 @@ bool EventStream::sendFrame(int delta_us) {
(0 > fprintf(stdout, "Content-Length: %d\r\n\r\n", img_buffer_size) )
||
( fwrite(img_buffer, img_buffer_size, 1, stdout) != 1 ) ) {
Error("Unable to send stream frame: %s", strerror(errno));
if ( errno != EPIPE )
Error("Unable to send stream frame: %s", strerror(errno));
return false;
}
} // end if send_raw or not

View File

@ -334,7 +334,7 @@ bool MonitorStream::sendFrame(const char *filepath, struct timeval *timestamp) {
||
(fwrite(img_buffer, img_buffer_size, 1, stdout) != 1)
) {
if ( !zm_terminate )
if ( !zm_terminate && errno != EPIPE )
Warning("Unable to send stream frame: %s", strerror(errno));
return false;
}
@ -420,7 +420,7 @@ bool MonitorStream::sendFrame(Image *image, struct timeval *timestamp) {
||
(fwrite(img_buffer, img_buffer_size, 1, stdout) != 1)
) {
if ( !zm_terminate ) {
if ( !zm_terminate && errno != EPIPE ) {
// If the pipe was closed, we will get signalled SIGPIPE to exit, which will set zm_terminate
Warning("Unable to send stream frame: %s", strerror(errno));
}