diff --git a/main/utils.c b/main/utils.c index 74932b8c27dca48132a90e4e0ba44b00979e485e..db3e4babee705f594ec48d5cfc6c1f8fc2fd2b0f 100644 --- a/main/utils.c +++ b/main/utils.c @@ -1399,7 +1399,13 @@ int ast_carefulwrite(int fd, char *s, int len, int timeoutms) if (res < 0 && errno != EAGAIN && errno != EINTR) { /* fatal error from write() */ - ast_log(LOG_ERROR, "write() returned error: %s\n", strerror(errno)); + if (errno == EPIPE) { +#ifndef STANDALONE + ast_debug(1, "write() failed due to reading end being closed: %s\n", strerror(errno)); +#endif + } else { + ast_log(LOG_ERROR, "write() returned error: %s\n", strerror(errno)); + } return -1; }