aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-09-15 18:39:37 +0200
committerKim Alvefur <zash@zash.se>2021-09-15 18:39:37 +0200
commitc85afe78276404e70d85a4e20af3a569fea33ed0 (patch)
tree5e3349c1362de3e9ae968fc7da6d22cbc0c92f1b
parent69600b88ebfb740626ff7ba8eb9f550f8c00a860 (diff)
downloadprosody-c85afe78276404e70d85a4e20af3a569fea33ed0.tar.gz
prosody-c85afe78276404e70d85a4e20af3a569fea33ed0.zip
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
-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 840e799a..2b50184d 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -460,7 +460,7 @@ function interface:onreadable()
self:debug("Read error, closing (%s)", err);
end
self:on("disconnect", err);
- self:destroy()
+ self:close();
return;
end
end