aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_select.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-04-10 20:40:07 +0100
committerMatthew Wild <mwild1@gmail.com>2018-04-10 20:40:07 +0100
commite1ba49852701c9f94a6d5bec52911f0f98629b4b (patch)
tree945dcb2ed1b3a7a76e900595eee0577bcc8882a5 /net/server_select.lua
parent5a7d12cdf01cc899eee000b564355cdf17c0d060 (diff)
downloadprosody-e1ba49852701c9f94a6d5bec52911f0f98629b4b.tar.gz
prosody-e1ba49852701c9f94a6d5bec52911f0f98629b4b.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.lua4
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