From 205ed4c510a1e8402bb63e23089a2147bc6f6cf5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 2 Mar 2021 10:14:25 -0500 Subject: [PATCH] EAGAIN happens when no one is listening. Make it a debug --- src/zm_fifo.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/zm_fifo.cpp b/src/zm_fifo.cpp index 7f737426e..83876b740 100644 --- a/src/zm_fifo.cpp +++ b/src/zm_fifo.cpp @@ -101,7 +101,10 @@ bool Fifo::writePacket(ZMPacket &packet) { Debug(1, "Writing header ZM %u %" PRId64, packet.packet.size, packet.pts); // Going to write a brief header if ( fprintf(outfile, "ZM %u %" PRId64 "\n", packet.packet.size, packet.pts) < 0 ) { - Error("Problem during writing: %s", strerror(errno)); + if (errno != EAGAIN) + Error("Problem during writing: %s", strerror(errno)); + else + Debug(1, "Problem during writing: %s", strerror(errno)); return false; } @@ -147,7 +150,10 @@ bool Fifo::write(uint8_t *data, size_t bytes, int64_t pts) { // Going to write a brief header Debug(1, "Writing header ZM %lu %" PRId64, bytes, pts); if ( fprintf(outfile, "ZM %lu %" PRId64 "\n", bytes, pts) < 0 ) { - Error("Problem during writing: %s", strerror(errno)); + if (errno != EAGAIN) + Error("Problem during writing: %s", strerror(errno)); + else + Debug(1, "Problem during writing: %s", strerror(errno)); return false; } if (fwrite(data, bytes, 1, outfile) != 1) {