diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-04-10 20:40:07 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-04-10 20:40:07 +0100 |
commit | e1ba49852701c9f94a6d5bec52911f0f98629b4b (patch) | |
tree | 945dcb2ed1b3a7a76e900595eee0577bcc8882a5 | |
parent | 5a7d12cdf01cc899eee000b564355cdf17c0d060 (diff) | |
download | prosody-e1ba49852701c9f94a6d5bec52911f0f98629b4b.tar.gz prosody-e1ba49852701c9f94a6d5bec52911f0f98629b4b.zip |
net.server_select: Allow setquitting("once") to allow resuming the loop later
-rw-r--r-- | net/server_select.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 |