Software /
code /
prosody
Changeset
9933:aac4c55721f9
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 28 Mar 2019 17:28:20 +0100 |
parents | 9930:12a31296d63d (current diff) 9932:df73ca804719 (diff) |
children | 9934:69982753fe4b |
files | net/server_epoll.lua |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Tue Mar 26 17:22:56 2019 +0000 +++ b/net/server_epoll.lua Thu Mar 28 17:28:20 2019 +0100 @@ -340,22 +340,25 @@ self:onconnect(); self:on("incoming", data); else + if err == "wantread" then + self:set(true, nil); + err = "timeout"; + elseif err == "wantwrite" then + self:set(nil, true); + err = "timeout"; + end if partial and partial ~= "" then self:onconnect(); self:on("incoming", partial, err); end - if err == "wantread" then - self:set(true, nil); - elseif err == "wantwrite" then - self:set(nil, true); - elseif err ~= "timeout" then + 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