Diff

net/server_epoll.lua @ 13809:2cfb6625b6d2 13.0

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.
author Kim Alvefur <zash@zash.se>
date Wed, 02 Apr 2025 15:54:31 +0200
parent 13754:0bd65ed1fd10
line wrap: on
line diff
--- a/net/server_epoll.lua	Wed Apr 02 16:13:55 2025 +0100
+++ b/net/server_epoll.lua	Wed Apr 02 15:54:31 2025 +0200
@@ -772,7 +772,7 @@
 		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