Changeset

11700:79d30de13fdb

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.
author Kim Alvefur <zash@zash.se>
date Sat, 17 Jul 2021 14:06:57 +0200
parents 11699:1275dad71afd
children 11701:a3572205c5bf
files net/server_epoll.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_epoll.lua	Fri Jul 16 17:10:09 2021 +0200
+++ b/net/server_epoll.lua	Sat Jul 17 14:06:57 2021 +0200
@@ -657,7 +657,6 @@
 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 @@
 		else
 			self:debug("TLS handshake complete");
 		end
+		self:setwritetimeout(false);
 		self.onwritable = nil;
 		self.onreadable = nil;
 		self:on("status", "ssl-handshake-complete");