diff options
author | Kim Alvefur <zash@zash.se> | 2016-08-18 16:46:20 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-08-18 16:46:20 +0200 |
commit | e7e49c4d02159420d925cf4aa45228822c7810f1 (patch) | |
tree | 2e5975b59c5e33ddca377a7b6661da6822bbf321 /net | |
parent | f8cf3d1254bc34bffe1d0b416a9e42b2e2c35311 (diff) | |
download | prosody-e7e49c4d02159420d925cf4aa45228822c7810f1.tar.gz prosody-e7e49c4d02159420d925cf4aa45228822c7810f1.zip |
net.server_epoll: Prevent anything from happening to destroyed sockets
Diffstat (limited to 'net')
-rw-r--r-- | net/server_epoll.lua | 8 |
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() |