# HG changeset patch # User Kim Alvefur # Date 1631723977 -7200 # Node ID 22825cb5dcd8bef223e15377bef814c0a2f8b141 # Parent 024b44ad5651eaced33c28925ce7750f186ea918 net.server_epoll: Don't immediately destroy upon getting closed on read Instead try to write any remaining buffered data. If the write attempt also fails with "closed" then there's nothing we can do and the socket is gone. This reverts what appears to be a mistakenly included part of c8aa66595072 Thanks jonas’ for noticing diff -r 024b44ad5651 -r 22825cb5dcd8 net/server_epoll.lua --- a/net/server_epoll.lua Wed Sep 15 15:34:57 2021 +0200 +++ b/net/server_epoll.lua Wed Sep 15 18:39:37 2021 +0200 @@ -460,7 +460,7 @@ self:debug("Read error, closing (%s)", err); end self:on("disconnect", err); - self:destroy() + self:close(); return; end end