# HG changeset patch # User Kim Alvefur # Date 1539307271 -7200 # Node ID 33d21f020b66578b812b7c1f1df0ded1430f5842 # Parent ae6636052be9bfbbb6394e3bf81373a8d094fe84 net.server_epoll: Ignore ENOENT when deregitering socket It should not really happen diff -r ae6636052be9 -r 33d21f020b66 net/server_epoll.lua --- a/net/server_epoll.lua Fri Oct 12 03:20:09 2018 +0200 +++ b/net/server_epoll.lua Fri Oct 12 03:21:11 2018 +0200 @@ -27,6 +27,7 @@ local poller = require "util.poll" local EEXIST = poller.EEXIST; +local ENOENT = poller.ENOENT; local poll = assert(poller.new()); @@ -310,7 +311,7 @@ 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 -r ae6636052be9 -r 33d21f020b66 util-src/poll.c --- a/util-src/poll.c Fri Oct 12 03:20:09 2018 +0200 +++ b/util-src/poll.c Fri Oct 12 03:21:11 2018 +0200 @@ -452,7 +452,7 @@ #endif } - lua_createtable(L, 0, 2); + lua_createtable(L, 0, 3); { lua_pushcfunction(L, Lnew); lua_setfield(L, -2, "new"); @@ -461,6 +461,7 @@ lua_setfield(L, -2, #named_error); push_errno(EEXIST); + push_errno(ENOENT); } return 1;