aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-01 19:32:54 +0100
committerKim Alvefur <zash@zash.se>2017-01-01 19:32:54 +0100
commit2099654c0c0aacfb78ce19571d708fb1018b6e9d (patch)
tree54fdf691f515f96a8024faa0e4e78940f9e8507b /net/server_epoll.lua
parentb093d6f947836d3c4d5981a4d430a8e6c9717a53 (diff)
downloadprosody-2099654c0c0aacfb78ce19571d708fb1018b6e9d.tar.gz
prosody-2099654c0c0aacfb78ce19571d708fb1018b6e9d.zip
net.server_epoll: Add the 'once' argument to loop for parity with server_select
Diffstat (limited to 'net/server_epoll.lua')
-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