From decfa3a59d8de0c90a6dfde6fb13f834ee84262e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 17 Jul 2021 14:06:57 +0200 Subject: net.server_epoll: Reduce timer churn during TLS handshake Instead of removing and readding the timer, keep it and adjust it instead. Should reduce garbage production a bit. --- net/server_epoll.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 52a7f4f3..3260ec23 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -657,7 +657,6 @@ function interface:inittls(tls_ctx, now) end function interface:tlshandshake() - self:setwritetimeout(false); self:setreadtimeout(false); self:noise("Continuing TLS handshake"); local ok, err = self.conn:dohandshake(); @@ -668,6 +667,7 @@ function interface:tlshandshake() else self:debug("TLS handshake complete"); end + self:setwritetimeout(false); self.onwritable = nil; self.onreadable = nil; self:on("status", "ssl-handshake-complete"); -- cgit v1.2.3