dovecot-2.0: net_disconnect(): Ignore ECONNRESET error.

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 17 16:47:31 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/c24ee1ebb159
changeset: 11564:c24ee1ebb159
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jun 17 14:47:16 2010 +0100
description:
net_disconnect(): Ignore ECONNRESET error.

diffstat:

 src/lib/network.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r c03424ecf8e5 -r c24ee1ebb159 src/lib/network.c
--- a/src/lib/network.c	Thu Jun 17 13:53:14 2010 +0100
+++ b/src/lib/network.c	Thu Jun 17 14:47:16 2010 +0100
@@ -298,7 +298,9 @@
 
 void net_disconnect(int fd)
 {
-	if (close(fd) < 0)
+	/* FreeBSD's close() fails with ECONNRESET if socket still has unsent
+	   data in transmit buffer. We don't care. */
+	if (close(fd) < 0 && errno != ECONNRESET)
 		i_error("net_disconnect() failed: %m");
 }
 


More information about the dovecot-cvs mailing list