From: Timo Sirainen Date: Tue, 17 May 2022 07:03:47 +0000 (+0200) Subject: imap: Don't log write() errors that fail due to ECONNRESET X-Git-Tag: 2.3.20~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06e883ec9504dd2d7d21a9ca3b5b7cd91ac89c15;p=thirdparty%2Fdovecot%2Fcore.git imap: Don't log write() errors that fail due to ECONNRESET These happen only before the client is fully initialized. --- diff --git a/src/imap/main.c b/src/imap/main.c index 8efcfd48ab..849db2af6a 100644 --- a/src/imap/main.c +++ b/src/imap/main.c @@ -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");