net.server_epoll: Skip delayed continuation read on paused connections 0.11
authorKim Alvefur <zash@zash.se>
Thu, 28 Mar 2019 12:52:55 +0100
branch0.11
changeset 9936 df73ca804719
parent 9935 485231f8b75d
child 9937 aac4c55721f9
child 9956 6402bc76f51a
net.server_epoll: Skip delayed continuation read on paused connections This should prevent #1333 in cases where LuaSockets buffer is "dirty", i.e. contains more data after a read, where it gets resumed with a short delay.
net/server_epoll.lua
--- a/net/server_epoll.lua	Thu Mar 28 12:31:14 2019 +0100
+++ b/net/server_epoll.lua	Thu Mar 28 12:52:55 2019 +0100
@@ -373,7 +373,7 @@
 		end
 	end
 	if not self.conn then return; end
-	if self.conn:dirty() then
+	if self._wantread and self.conn:dirty() then
 		self:setreadtimeout(false);
 		self:pausefor(cfg.read_retry_delay);
 	else