aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_epoll.lua3
-rw-r--r--util-src/poll.c3
2 files changed, 4 insertions, 2 deletions
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
diff --git a/util-src/poll.c b/util-src/poll.c
index 58f29041..e5b5f70c 100644
--- a/util-src/poll.c
+++ b/util-src/poll.c
@@ -452,7 +452,7 @@ int luaopen_util_poll(lua_State *L) {
#endif
}
- lua_createtable(L, 0, 2);
+ lua_createtable(L, 0, 3);
{
lua_pushcfunction(L, Lnew);
lua_setfield(L, -2, "new");
@@ -461,6 +461,7 @@ int luaopen_util_poll(lua_State *L) {
lua_setfield(L, -2, #named_error);
push_errno(EEXIST);
+ push_errno(ENOENT);
}
return 1;