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
commit667850792bce5d874cf7c03af587bf2a88ada6ec (patch)
tree54fdf691f515f96a8024faa0e4e78940f9e8507b /net/server_epoll.lua
parent4c52149e6535190ad71f130ad8243afabd4acfcd (diff)
downloadprosody-667850792bce5d874cf7c03af587bf2a88ada6ec.tar.gz
prosody-667850792bce5d874cf7c03af587bf2a88ada6ec.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