# HG changeset patch # User Kim Alvefur # Date 1626178826 -7200 # Node ID 3ab8496579f138e4cbbba399e2cab8d972a8001f # Parent 79f8e29e88a0ecd2f52ed214605f127617e1ae34 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. diff -r 79f8e29e88a0 -r 3ab8496579f1 net/server_epoll.lua --- a/net/server_epoll.lua Tue Jul 13 14:20:24 2021 +0200 +++ b/net/server_epoll.lua Tue Jul 13 14:20:26 2021 +0200 @@ -703,6 +703,7 @@ 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);