]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Don't log write() errors that fail due to ECONNRESET
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 17 May 2022 07:03:47 +0000 (09:03 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 17 May 2022 15:17:24 +0000 (17:17 +0200)
These happen only before the client is fully initialized.

src/imap/main.c

index 8efcfd48abc656746571047fb6b9c2c9ba1c0105..849db2af6a3bc2c4d345bfbdfb7950e55e3dd22c 100644 (file)
@@ -212,7 +212,8 @@ client_send_login_reply(struct ostream *output, const char *capability_string,
        }
        o_stream_nsend(output, str_data(reply), str_len(reply));
        if (o_stream_uncork_flush(output) < 0 &&
-           output->stream_errno != EPIPE)
+           output->stream_errno != EPIPE &&
+           output->stream_errno != ECONNRESET)
                i_error("write(client) failed: %s", o_stream_get_error(output));
 }
 
@@ -411,7 +412,8 @@ login_client_connected(const struct master_login_client *login_client,
        if (client_create_finish(client, &error) < 0) {
                if (write_full(login_client->fd, MSG_BYE_INTERNAL_ERROR,
                               strlen(MSG_BYE_INTERNAL_ERROR)) < 0)
-                       if (errno != EAGAIN && errno != EPIPE)
+                       if (errno != EAGAIN && errno != EPIPE &&
+                           errno != ECONNRESET)
                                e_error(client->event,
                                        "write_full(client) failed: %m");