dovecot-2.0: *-login: Ignore ENOTCONN error for shutdown()

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 13 18:59:49 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/babeebf041c4
changeset: 12107:babeebf041c4
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 13 16:59:45 2010 +0100
description:
*-login: Ignore ENOTCONN error for shutdown()
It's probably just a duplicate of a previous read() failure.

diffstat:

 src/login-common/client-common-auth.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 18ab89f4d6a1 -r babeebf041c4 src/login-common/client-common-auth.c
--- a/src/login-common/client-common-auth.c	Mon Sep 13 16:18:31 2010 +0100
+++ b/src/login-common/client-common-auth.c	Mon Sep 13 16:59:45 2010 +0100
@@ -442,7 +442,7 @@
 
 		/* the fd may still be hanging somewhere in kernel or another
 		   process. make sure the client gets disconnected. */
-		if (shutdown(client->fd, SHUT_RDWR) < 0)
+		if (shutdown(client->fd, SHUT_RDWR) < 0 && errno != ENOTCONN)
 			i_error("shutdown() failed: %m");
 
 		if (data == NULL)


More information about the dovecot-cvs mailing list