aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-13 14:20:26 +0200
committerKim Alvefur <zash@zash.se>2021-07-13 14:20:26 +0200
commit72fae8bef744f766e31024d13bff38a14457f1af (patch)
tree22dad7c5de0e48ebf0ba56c4409ccd62cdbcf47b /net/server_epoll.lua
parent9615fcca979a796bf9f7b7ba2ba6d1381806e454 (diff)
downloadprosody-72fae8bef744f766e31024d13bff38a14457f1af.tar.gz
prosody-72fae8bef744f766e31024d13bff38a14457f1af.zip
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.
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua1
1 files changed, 1 insertions, 0 deletions
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);