aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index ce2782c1..b4477375 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -508,7 +508,8 @@ function interface:onreadable()
end
if err == "closed" and self._connected then
self:debug("Connection closed by remote");
- self:close(err);
+ self:on("disconnect", err);
+ self:destroy();
return;
elseif err ~= "timeout" then
self:debug("Read error, closing (%s)", err);