From d2fe608c72c66d35fc94aeba5d16e1d5da39df22 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Wed, 8 Feb 2017 22:47:49 +0100 Subject: [PATCH] [http_streaming] Reduce log severity if write returns EAGAIN, it just means that pipe was temporarily full (ref issue #329) --- src/httpd_streaming.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/httpd_streaming.c b/src/httpd_streaming.c index 5353fa33..b9340fca 100644 --- a/src/httpd_streaming.c +++ b/src/httpd_streaming.c @@ -204,7 +204,12 @@ streaming_write(uint8_t *buf, uint64_t rtptime) ret = write(streaming_pipe[1], buf, STREAMING_RAWBUF_SIZE); if (ret < 0) - DPRINTF(E_LOG, L_STREAMING, "Error writing to streaming pipe: %s\n", strerror(errno)); + { + if (errno == EAGAIN) + DPRINTF(E_WARN, L_STREAMING, "Streaming pipe full, skipping write\n"); + else + DPRINTF(E_LOG, L_STREAMING, "Error writing to streaming pipe: %s\n", strerror(errno)); + } } int