summaryrefslogtreecommitdiffstats
path: root/src/tlsmgr/tlsmgr.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 18:56:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 18:56:32 +0000
commitd69ce7d9d20543084bdf7cfe5e1bab83a728b00d (patch)
tree2f2dec5d8daee53c4246052f6d737028b4becd6d /src/tlsmgr/tlsmgr.c
parentReleasing progress-linux version 3.7.10-0+deb12u1progress7u1. (diff)
downloadpostfix-d69ce7d9d20543084bdf7cfe5e1bab83a728b00d.tar.xz
postfix-d69ce7d9d20543084bdf7cfe5e1bab83a728b00d.zip
Merging upstream version 3.7.11.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tlsmgr/tlsmgr.c')
-rw-r--r--src/tlsmgr/tlsmgr.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tlsmgr/tlsmgr.c b/src/tlsmgr/tlsmgr.c
index 28ca961..d32e63d 100644
--- a/src/tlsmgr/tlsmgr.c
+++ b/src/tlsmgr/tlsmgr.c
@@ -819,6 +819,23 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
}
/*
+ * Workaround: some OS lies under load. It tells the Postfix event
+ * handler that a server socket is readable, then it tells peekfd() that
+ * the socket has unread data, and then it tells vstring_get_null() that
+ * there is none, causing Postfix to spam the log with warning messages.
+ * Close the stream to stop such nonsense; the client can reconnect if it
+ * still wants to talk to us.
+ *
+ * XXX Why is this problem not reported for the other five
+ * multi_server-based Postfix services?
+ */
+ else if (vstream_ferror(client_stream) || vstream_feof(client_stream)) {
+ multi_server_disconnect(client_stream);
+ return;
+ /* Note: client_stream is now a dangling pointer. */
+ }
+
+ /*
* Protocol error.
*/
else {