aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-05-04 04:23:35 +0200
committerKim Alvefur <zash@zash.se>2019-05-04 04:23:35 +0200
commitd2d042186f440e4f95444c693c9a7737cc377e56 (patch)
tree1a455be511e7dea40e9f1b5e8c23b866be31eb17 /net
parentf83b6fc79cdc853ef2df401a78ef9ff969cf803a (diff)
downloadprosody-d2d042186f440e4f95444c693c9a7737cc377e56.tar.gz
prosody-d2d042186f440e4f95444c693c9a7737cc377e56.zip
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.
Diffstat (limited to 'net')
-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 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