From 06e883ec9504dd2d7d21a9ca3b5b7cd91ac89c15 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 17 May 2022 09:03:47 +0200 Subject: [PATCH] imap: Don't log write() errors that fail due to ECONNRESET These happen only before the client is fully initialized. --- src/imap/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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"); -- 2.47.3