From aba20a09bf1033b1f9c8ab2830d7d58970dd717f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 17 Jul 2021 14:51:50 +0200 Subject: net.server_epoll: Skip reset of read timeout when not reading Should avoid rare but needless timer interactions --- net/server_epoll.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 3260ec23..ae8a66bb 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -458,7 +458,8 @@ function interface:onreadable() return; end end - if self._wantread and self.conn:dirty() then + if not self._wantread then return end + if self.conn:dirty() then self:setreadtimeout(false); self:pausefor(cfg.read_retry_delay); else -- cgit v1.2.3