From 9ddc00a095f52307cba7f738f9408acdc9eb4ed2 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 4 Dec 2025 14:54:58 +0000 Subject: Actually make fds blocking even in notls, just in case --- src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c b/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c index 98345a8..e4b953c 100644 --- a/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c +++ b/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c @@ -323,11 +323,11 @@ static void child (int fdr, int fdw) if (!wantexec) _exit(0) ; if (buffer_len(&io[1].out) && !buffer_timed_flush_g(&io[1].out, &deadline)) strerr_diefu1sys(111, "write to server") ; + if (ndelay_off(0) == -1 || ndelay_off(1) == -1) + strerr_diefu1sys(111, "make fds blocking") ; if (wantexec >= 2) { int got = 0 ; - if (ndelay_off(0) == -1 || ndelay_off(1) == -1) - strerr_diefu1sys(111, "make fds blocking") ; if (write(fdctl, "Y", 1) != 1) strerr_diefu1sys(111, "send ucspi-tls start command") ; fd_shutdown(fdctl, 1) ; -- cgit v1.3.1