]> git.pld-linux.org Git - packages/dovecot.git/blame - dovecot-small_fixes.patch
- final upstream fix
[packages/dovecot.git] / dovecot-small_fixes.patch
CommitLineData
262a08a0
AM
1From 25028730cd1b76e373ff989625132d526eea2504 Mon Sep 17 00:00:00 2001
2From: Timo Sirainen <timo.sirainen@open-xchange.com>
3Date: Mon, 15 Jul 2019 10:14:23 +0300
4Subject: [PATCH] lib: ostream-file: Don't log any errors when setting
5 TCP_NODELAY
6
7It's likely never useful to log the error, and it seems more and more
8unexpected errors just keep popping up.
9---
10 src/lib/ostream-file.c | 18 +++++++++---------
11 1 file changed, 9 insertions(+), 9 deletions(-)
12
13diff --git a/src/lib/ostream-file.c b/src/lib/ostream-file.c
14index e7e6f62d12..82bf729ac0 100644
15--- a/src/lib/ostream-file.c
16+++ b/src/lib/ostream-file.c
17@@ -333,17 +333,17 @@ static int buffer_flush(struct file_ostream *fstream)
18 static void o_stream_tcp_flush_via_nodelay(struct file_ostream *fstream)
2f455ff1
AM
19 {
20 if (net_set_tcp_nodelay(fstream->fd, TRUE) < 0) {
262a08a0 21- if (errno != ENOTSUP && errno != ENOTSOCK &&
2f455ff1 22- errno != ENOPROTOOPT) {
262a08a0
AM
23- i_error("file_ostream.net_set_tcp_nodelay(%s, TRUE) failed: %m",
24- o_stream_get_name(&fstream->ostream.ostream));
25- }
26+ /* Don't bother logging errors. There are quite a lot of
27+ different errors that need to be ignored, and it differs
28+ between OSes. At least:
29+ Linux: ENOTSUP, ENOTSOCK, ENOPROTOOPT
30+ FreeBSD: EINVAL, ECONNRESET */
31 fstream->no_socket_nodelay = TRUE;
32 } else if (net_set_tcp_nodelay(fstream->fd, FALSE) < 0) {
33- /* We already successfully enabled TCP_NODELAY, so we're really
34- not expecting any errors here. */
35- i_error("file_ostream.net_set_tcp_nodelay(%s, FALSE) failed: %m",
36- o_stream_get_name(&fstream->ostream.ostream));
37+ /* We already successfully enabled TCP_NODELAY, so there
38+ shouldn't really be errors. Except ECONNRESET can possibly
39+ still happen between these two calls, so again don't log
40+ errors. */
41 fstream->no_socket_nodelay = TRUE;
42 }
43 }
This page took 0.087683 seconds and 4 git commands to generate.