mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
mail/dovecot: stop whining about TCP_NODELAY errors.
[PATCH] lib: ostream-file: Don't log any errors when setting TCP_NODELAY It's likely never useful to log the error, and it seems more and more unexpected errors just keep popping up. Obtained from: upstream git.
This commit is contained in:
parent
8e72dbf4e4
commit
454dfccf4e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=506821
2 changed files with 27 additions and 9 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
PORTNAME= dovecot
|
||||
PORTVERSION= 2.3.7
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= mail ipv6
|
||||
MASTER_SITES= https://dovecot.org/releases/2.3/
|
||||
|
||||
|
|
|
@ -1,11 +1,29 @@
|
|||
--- src/lib/ostream-file.c.orig 2019-07-12 19:18:41 UTC
|
||||
--- src/lib/ostream-file.c.orig 2019-07-12 19:19:37 UTC
|
||||
+++ src/lib/ostream-file.c
|
||||
@@ -334,7 +334,7 @@ static void o_stream_tcp_flush_via_nodelay(struct file
|
||||
@@ -333,17 +333,17 @@ static int buffer_flush(struct file_ostream *fstream)
|
||||
static void o_stream_tcp_flush_via_nodelay(struct file_ostream *fstream)
|
||||
{
|
||||
if (net_set_tcp_nodelay(fstream->fd, TRUE) < 0) {
|
||||
if (errno != ENOTSUP && errno != ENOTSOCK &&
|
||||
- errno != ENOPROTOOPT) {
|
||||
+ errno != ENOPROTOOPT && errno != EINVAL) {
|
||||
i_error("file_ostream.net_set_tcp_nodelay(%s, TRUE) failed: %m",
|
||||
o_stream_get_name(&fstream->ostream.ostream));
|
||||
}
|
||||
- if (errno != ENOTSUP && errno != ENOTSOCK &&
|
||||
- errno != ENOPROTOOPT && errno != EINVAL) {
|
||||
- i_error("file_ostream.net_set_tcp_nodelay(%s, TRUE) failed: %m",
|
||||
- o_stream_get_name(&fstream->ostream.ostream));
|
||||
- }
|
||||
+ /* Don't bother logging errors. There are quite a lot of
|
||||
+ different errors that need to be ignored, and it differs
|
||||
+ between OSes. At least:
|
||||
+ Linux: ENOTSUP, ENOTSOCK, ENOPROTOOPT
|
||||
+ FreeBSD: EINVAL, ECONNRESET */
|
||||
fstream->no_socket_nodelay = TRUE;
|
||||
} else if (net_set_tcp_nodelay(fstream->fd, FALSE) < 0) {
|
||||
- /* We already successfully enabled TCP_NODELAY, so we're really
|
||||
- not expecting any errors here. */
|
||||
- i_error("file_ostream.net_set_tcp_nodelay(%s, FALSE) failed: %m",
|
||||
- o_stream_get_name(&fstream->ostream.ostream));
|
||||
+ /* We already successfully enabled TCP_NODELAY, so there
|
||||
+ shouldn't really be errors. Except ECONNRESET can possibly
|
||||
+ still happen between these two calls, so again don't log
|
||||
+ errors. */
|
||||
fstream->no_socket_nodelay = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue