Diff

net/server_epoll.lua @ 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
parent 9506:ae6636052be9
child 9508:2055b497b515
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