aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
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
commite7e49c4d02159420d925cf4aa45228822c7810f1 (patch)
tree2e5975b59c5e33ddca377a7b6661da6822bbf321 /net/server_epoll.lua
parentf8cf3d1254bc34bffe1d0b416a9e42b2e2c35311 (diff)
downloadprosody-e7e49c4d02159420d925cf4aa45228822c7810f1.tar.gz
prosody-e7e49c4d02159420d925cf4aa45228822c7810f1.zip
net.server_epoll: Prevent anything from happening to destroyed sockets
Diffstat (limited to 'net/server_epoll.lua')
-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()