Software /
code /
prosody
Changeset
9507:33d21f020b66
net.server_epoll: Ignore ENOENT when deregitering socket
It should not really happen
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 12 Oct 2018 03:21:11 +0200 |
parents | 9506:ae6636052be9 |
children | 9508:2055b497b515 |
files | net/server_epoll.lua util-src/poll.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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;