From ec7fb3ee614bdd315bd2657c22280bff0e0ed6b1 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 12 Oct 2018 03:21:11 +0200 Subject: net.server_epoll: Ignore ENOENT when deregitering socket It should not really happen --- net/server_epoll.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index fc939675..cb83c8c3 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -27,6 +27,7 @@ local _SOCKETINVALID = socket._SOCKETINVALID or -1; local poller = require "util.poll" local EEXIST = poller.EEXIST; +local ENOENT = poller.ENOENT; local poll = assert(poller.new()); @@ -310,7 +311,7 @@ function interface:del() return nil, "unregistered fd"; end local ok, err, errno = poll:del(fd); - if not ok then + if not ok and errno ~= ENOENT then log("error", "Could not unregister %s: %s(%d)", self, err, errno); return ok, err; end -- cgit v1.2.3