# HG changeset patch # User Matthew Wild # Date 1523389207 -3600 # Node ID fb3cd6b2263bff5f3cccd88b96d4e30d2bd1e298 # Parent 2fdeb979cc7c7cdf4a8215a7ec8736cc0ac121e5 net.server_select: Allow setquitting("once") to allow resuming the loop later diff -r 2fdeb979cc7c -r fb3cd6b2263b net/server_select.lua --- a/net/server_select.lua Tue Apr 10 20:39:05 2018 +0100 +++ b/net/server_select.lua Tue Apr 10 20:40:07 2018 +0100 @@ -889,7 +889,7 @@ local quitting; local function setquitting(quit) - quitting = not not quit; + quitting = quit; end loop = function(once) -- this is the main loop of the program @@ -958,7 +958,7 @@ end end until quitting; - if once and quitting == "once" then quitting = nil; return; end + if quitting == "once" then quitting = nil; return; end closeall(); return "quitting" end