From 4c4988ab3eff8e19bf3ba84d71d6180498d2a0c4 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 10 Apr 2018 20:40:07 +0100 Subject: net.server_select: Allow setquitting("once") to allow resuming the loop later --- net/server_select.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/server_select.lua') diff --git a/net/server_select.lua b/net/server_select.lua index e1c8aefe..cfd08f37 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -889,7 +889,7 @@ end 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 @@ loop = function(once) -- this is the main loop of the program 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 -- cgit v1.2.3