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 | 4c4988ab3eff8e19bf3ba84d71d6180498d2a0c4 (patch) | |
tree | 945dcb2ed1b3a7a76e900595eee0577bcc8882a5 /net/server_select.lua | |
parent | 76a81554ff9c0babc714ebf4a0f4cd439e4033cf (diff) | |
download | prosody-4c4988ab3eff8e19bf3ba84d71d6180498d2a0c4.tar.gz prosody-4c4988ab3eff8e19bf3ba84d71d6180498d2a0c4.zip |
net.server_select: Allow setquitting("once") to allow resuming the loop later
Diffstat (limited to 'net/server_select.lua')
-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 |