From: Timo Sirainen Date: Wed, 23 Oct 2013 12:36:02 +0000 (+0300) Subject: replication plugin: Hide write(fifo) EPIPE errors, which just mean a server restart. X-Git-Tag: 2.2.7~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7195a14c21f79c239d25719e647af37c9a0bf380;p=thirdparty%2Fdovecot%2Fcore.git replication plugin: Hide write(fifo) EPIPE errors, which just mean a server restart. --- diff --git a/src/plugins/replication/replication-plugin.c b/src/plugins/replication/replication-plugin.c index 440f26e5fc..043a1f1534 100644 --- a/src/plugins/replication/replication-plugin.c +++ b/src/plugins/replication/replication-plugin.c @@ -85,10 +85,14 @@ replication_fifo_notify(struct mail_user *user, return 0; } if (ret != (ssize_t)str_len(str)) { - if (ret < 0) - i_error("write(%s) failed: %m", fifo_path); - else + if (ret > 0) i_error("write(%s) wrote partial data", fifo_path); + else if (errno != EPIPE) + i_error("write(%s) failed: %m", fifo_path); + else { + /* server was probably restarted, don't bother logging + this. */ + } if (close(fifo_fd) < 0) i_error("close(%s) failed: %m", fifo_path); fifo_fd = -1;