]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
replication plugin: Hide write(fifo) EPIPE errors, which just mean a server restart.
authorTimo Sirainen <tss@iki.fi>
Wed, 23 Oct 2013 12:36:02 +0000 (15:36 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 23 Oct 2013 12:36:02 +0000 (15:36 +0300)
src/plugins/replication/replication-plugin.c

index 440f26e5fc42e7ab8607239382f1963464bca44b..043a1f1534754820208ce92d88d0cd45637826c4 100644 (file)
@@ -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;