From c701571b95706403c7c714d48d2966206265499e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 2 Apr 2025 15:54:31 +0200 Subject: net.server_epoll: Use correct connection timeout when initiating Direct TLS Otherwise it takes a lot longer to time out Direct TLS connections than TCP / STARTTLS connections. --- net/server_epoll.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 44ab4f69..ca5a950c 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -772,7 +772,7 @@ function interface:starttls(tls_ctx) self.onreadable = interface.inittls; self:set(true, true); self:setreadtimeout(false); - self:setwritetimeout(cfg.ssl_handshake_timeout); + self:setwritetimeout(self._connected and cfg.ssl_handshake_timeout or cfg.connect_timeout); self:debug("Prepared to start TLS"); end end -- cgit v1.2.3