aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-18 16:46:20 +0200
committerKim Alvefur <zash@zash.se>2016-08-18 16:46:20 +0200
commitc5a123ab408b06d82e2cc17e818bd862b8b66876 (patch)
tree2e5975b59c5e33ddca377a7b6661da6822bbf321
parent53e047492b5d5711a5990f7b8e4965723ef2a536 (diff)
downloadprosody-c5a123ab408b06d82e2cc17e818bd862b8b66876.tar.gz
prosody-c5a123ab408b06d82e2cc17e818bd862b8b66876.zip
net.server_epoll: Prevent anything from happening to destroyed sockets
-rw-r--r--net/server_epoll.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 89f358a5..713baa0c 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -351,8 +351,14 @@ function interface:destroy()
self:setflags(false, false);
self:setwritetimeout(false);
self:setreadtimeout(false);
+ self.onreadable = noop;
+ self.onwriteable = noop;
+ self.destroy = noop;
+ self.close = noop;
+ self.on = noop;
fds[self:getfd()] = nil;
- return self.conn:close();
+ self.conn:close();
+ self.conn = nil;
end
function interface:ssl()