aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 23564816..5ca9f327 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -617,7 +617,7 @@ local function setquitting()
end
-- Main loop
-local function loop()
+local function loop(once)
repeat
local t = runtimers(cfg.max_wait, cfg.min_wait);
local fd, r, w = epoll.wait(t);
@@ -637,7 +637,7 @@ local function loop()
elseif r ~= "timeout" then
log("debug", "epoll_wait error: %s", tostring(r));
end
- until quitting;
+ until once or quitting;
return quitting;
end