aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-03-28 12:52:55 +0100
committerKim Alvefur <zash@zash.se>2019-03-28 12:52:55 +0100
commitd4c35255c06539fdc928b3b12df61f2ebd09ad64 (patch)
treee1381b9ba3bdf52f9afe296c65a5f4cb7a2fe113
parentnet.server_epoll: Handle LuaSec wantread/wantwrite conditions before callbacks (fixes #1333) (diff)
downloadprosody-d4c35255c06539fdc928b3b12df61f2ebd09ad64.tar.xz
prosody-d4c35255c06539fdc928b3b12df61f2ebd09ad64.zip
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.
-rw-r--r--net/server_epoll.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index cffd3a844..c41266e1a 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -373,7 +373,7 @@ function interface:onreadable()
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