# HG changeset patch # User Kim Alvefur # Date 1483295574 -3600 # Node ID 03081bd5c5bbd3d7e773a63548cdbaaba3026f00 # Parent 424bbbeb92571ce1bb778b170de5b6af40b3f0c7 net.server_epoll: Add the 'once' argument to loop for parity with server_select diff -r 424bbbeb9257 -r 03081bd5c5bb net/server_epoll.lua --- a/net/server_epoll.lua Sun Jan 01 19:30:38 2017 +0100 +++ b/net/server_epoll.lua Sun Jan 01 19:32:54 2017 +0100 @@ -617,7 +617,7 @@ 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 @@ elseif r ~= "timeout" then log("debug", "epoll_wait error: %s", tostring(r)); end - until quitting; + until once or quitting; return quitting; end