# HG changeset patch # User Kim Alvefur # Date 1471531580 -7200 # Node ID 5e884501a9ac6905a2d132342f765ffcd948d33c # Parent 0266434d7df113b73cc2b5e8568453747a1991aa net.server_epoll: Prevent anything from happening to destroyed sockets diff -r 0266434d7df1 -r 5e884501a9ac net/server_epoll.lua --- a/net/server_epoll.lua Thu Aug 18 16:41:22 2016 +0200 +++ b/net/server_epoll.lua Thu Aug 18 16:46:20 2016 +0200 @@ -351,8 +351,14 @@ 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()