Diff

net/server_epoll.lua @ 9994:524b8cd76780 0.11

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.
author Kim Alvefur <zash@zash.se>
date Sat, 04 May 2019 04:23:35 +0200
parent 9932:df73ca804719
child 9995:8d46ecc4bd0c
child 10059:c8c3f2eba898
line wrap: on
line diff
--- a/net/server_epoll.lua	Wed May 01 22:34:15 2019 +0200
+++ b/net/server_epoll.lua	Sat May 04 04:23:35 2019 +0200
@@ -600,10 +600,10 @@
 	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