From: Timo Sirainen Date: Thu, 17 Jun 2010 13:47:16 +0000 (+0100) Subject: net_disconnect(): Ignore ECONNRESET error. X-Git-Tag: 2.0.rc1~154 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=507465df7237e431f456bf82dff6282a7192981c;p=thirdparty%2Fdovecot%2Fcore.git net_disconnect(): Ignore ECONNRESET error. --HG-- branch : HEAD --- diff --git a/src/lib/network.c b/src/lib/network.c index 5abc5cd835..af3da1e96f 100644 --- a/src/lib/network.c +++ b/src/lib/network.c @@ -298,7 +298,9 @@ int net_connect_unix_with_retries(const char *path, unsigned int msecs) 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"); }