From 6dfc361a6cabbbd3894cadb5504ccec0a7d7ae27 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 4 May 2019 04:23:35 +0200 Subject: net.server_epoll: Restore wantread flag after pause (fixes #1354) If a chunk of data has been received that is larger than the amount read at a time, then the connection is paused for a short time after which it tries to read some more. If, after that, there is still more data to read, it should do the same thing. However, because the "want read" flag is removed and was restored after the delayed reading, it would not schedule another delayed read. --- net/server_epoll.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/server_epoll.lua') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index c41266e1..c279c579 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -600,10 +600,10 @@ function interface:pausefor(t) self:set(false); self._pausefor = addtimer(t, function () self._pausefor = nil; + self:set(true); if self.conn and self.conn:dirty() then self:onreadable(); end - self:set(true); end); end -- cgit v1.2.3