net/server_epoll.lua
branch0.11
changeset 12088 59557bc3c4b8
parent 11815 ae43166fe931
child 12095 7a48ccb084dd
--- a/net/server_epoll.lua	Tue Oct 12 14:53:45 2021 +0200
+++ b/net/server_epoll.lua	Thu Oct 21 15:59:16 2021 +0200
@@ -771,7 +771,7 @@
 	repeat
 		local t = runtimers(cfg.max_wait, cfg.min_wait);
 		local fd, r, w = poll:wait(t);
-		if fd then
+		while fd do
 			local conn = fds[fd];
 			if conn then
 				if r then
@@ -784,7 +784,9 @@
 				log("debug", "Removing unknown fd %d", fd);
 				poll:del(fd);
 			end
-		elseif r ~= "timeout" and r ~= "signal" then
+			fd, r, w = poll:wait(0);
+		end
+		if r ~= "timeout" and r ~= "signal" then
 			log("debug", "epoll_wait error: %s[%d]", r, w);
 		end
 	until once or (quitting and next(fds) == nil);