aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-11 22:49:26 +0200
committerKim Alvefur <zash@zash.se>2016-08-11 22:49:26 +0200
commit51aabf600add1fbb81a41452a29383663c98702f (patch)
treec199aa3cab242f42536547f4a6cfe23c7985ace5 /net/server_epoll.lua
parent6d0852cbc20ec45adcc34cafd0a9f1b16fd47763 (diff)
downloadprosody-51aabf600add1fbb81a41452a29383663c98702f.tar.gz
prosody-51aabf600add1fbb81a41452a29383663c98702f.zip
net.server_epoll: Don't mistake success for an error
Diffstat (limited to 'net/server_epoll.lua')
-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 8880c793..100d3340 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -232,7 +232,7 @@ function interface:onreadable()
self:setflags(true, nil);
elseif err == "wantwrite" then
self:setflags(nil, true);
- elseif err ~= "timeout" then
+ elseif not data and err ~= "timeout" then
self.listeners.ondisconnect(self, err);
self:destroy()
return;