aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_epoll.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index c47e1a70..eb292784 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -771,7 +771,7 @@ local function loop(once)
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 @@ local function loop(once)
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);