From 2099654c0c0aacfb78ce19571d708fb1018b6e9d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 1 Jan 2017 19:32:54 +0100 Subject: net.server_epoll: Add the 'once' argument to loop for parity with server_select --- net/server_epoll.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/server_epoll.lua') 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 -- cgit v1.2.3