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
commitf77c81d9284a1170fae0d1637f73868b5f799e4c (patch)
treec199aa3cab242f42536547f4a6cfe23c7985ace5 /net/server_epoll.lua
parente21d18c2b540f28efc3af81121cecc2f94ffce7a (diff)
downloadprosody-f77c81d9284a1170fae0d1637f73868b5f799e4c.tar.gz
prosody-f77c81d9284a1170fae0d1637f73868b5f799e4c.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;