From 72fae8bef744f766e31024d13bff38a14457f1af Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 13 Jul 2021 14:20:26 +0200 Subject: net.server_epoll: Start TLS handshake immediately on newly accepted connections Since TLS is a client-first protocol there is a chance that the ClientHello message is available already. TLS Fast Open and/or the TCP_DEFER_ACCEPT socket option would increase that chance. --- net/server_epoll.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/net/server_epoll.lua b/net/server_epoll.lua index f7a7dafa..6bc59662 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -703,6 +703,7 @@ function interface:onacceptable() if client:inittls(self.tls_ctx) then client:setreadtimeout(cfg.ssl_handshake_timeout); client:setwritetimeout(cfg.ssl_handshake_timeout); + client:tlshandshake(); end else client:add(true, false); -- cgit v1.2.3