dovecot-2.2: replication plugin: Hide write(fifo) EPIPE errors, ...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 23 15:36:15 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/e1dc6989b2c0
changeset: 16872:e1dc6989b2c0
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 23 15:36:02 2013 +0300
description:
replication plugin: Hide write(fifo) EPIPE errors, which just mean a server restart.
diffstat:
src/plugins/replication/replication-plugin.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r e721788d2946 -r e1dc6989b2c0 src/plugins/replication/replication-plugin.c
--- a/src/plugins/replication/replication-plugin.c Wed Oct 23 15:26:35 2013 +0300
+++ b/src/plugins/replication/replication-plugin.c Wed Oct 23 15:36:02 2013 +0300
@@ -85,10 +85,14 @@
return 0;
}
if (ret != (ssize_t)str_len(str)) {
- if (ret < 0)
+ 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
- i_error("write(%s) wrote partial data", 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;
More information about the dovecot-cvs
mailing list