From f77c81d9284a1170fae0d1637f73868b5f799e4c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 11 Aug 2016 22:49:26 +0200 Subject: net.server_epoll: Don't mistake success for an error --- net/server_epoll.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3