aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-03-28 17:28:20 +0100
committerKim Alvefur <zash@zash.se>2019-03-28 17:28:20 +0100
commitaa2c9c178ec5f78aaadcf2eeb67612dd0980355f (patch)
tree4467e4b07b12116a8f03ecc024c9f8a4c53967f4 /net
parente986a0e13786adbf60c42d352a019fd62b903c34 (diff)
parentd4c35255c06539fdc928b3b12df61f2ebd09ad64 (diff)
downloadprosody-aa2c9c178ec5f78aaadcf2eeb67612dd0980355f.tar.gz
prosody-aa2c9c178ec5f78aaadcf2eeb67612dd0980355f.zip
Merge 0.11->trunk
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua15
1 files changed, 9 insertions, 6 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 4037f7ab..be0a5b6a 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -340,22 +340,25 @@ function interface:onreadable()
self:onconnect();
self:on("incoming", data);
else
- if partial and partial ~= "" then
- self:onconnect();
- self:on("incoming", partial, err);
- end
if err == "wantread" then
self:set(true, nil);
+ err = "timeout";
elseif err == "wantwrite" then
self:set(nil, true);
- elseif err ~= "timeout" then
+ err = "timeout";
+ end
+ if partial and partial ~= "" then
+ self:onconnect();
+ self:on("incoming", partial, err);
+ end
+ if err ~= "timeout" then
self:on("disconnect", err);
self:destroy()
return;
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