]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
*-login: Ignore ENOTCONN error for shutdown()
authorTimo Sirainen <tss@iki.fi>
Mon, 13 Sep 2010 15:59:45 +0000 (16:59 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 13 Sep 2010 15:59:45 +0000 (16:59 +0100)
It's probably just a duplicate of a previous read() failure.

src/login-common/client-common-auth.c

index bbc513ad53ed1005de8451f67ec51ab5fc250cdd..8236e1e599167094573597006fb401e8395b2bd3 100644 (file)
@@ -442,7 +442,7 @@ sasl_callback(struct client *client, enum sasl_server_reply sasl_reply,
 
                /* 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)