aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-02-22 14:17:27 +0100
committerKim Alvefur <zash@zash.se>2022-02-22 14:17:27 +0100
commit36512eca292578726109ceeb3ee8e1293102fd29 (patch)
tree337ec96ecc6efa649aeea666f07ccfcb621cf287 /plugins/mod_s2s.lua
parentac06985604e2def6e1414113fd3266243b944303 (diff)
downloadprosody-36512eca292578726109ceeb3ee8e1293102fd29.tar.gz
prosody-36512eca292578726109ceeb3ee8e1293102fd29.zip
mod_c2s,mod_s2s: Fix error on shutdown (Thanks Martin)
Since there are two calls to done() that can happen, if the timing is right (or wrong) both can happen, which previously triggered an error.
Diffstat (limited to 'plugins/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index e539082d..ed91844c 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -973,7 +973,7 @@ module:hook("server-stopping", function(event)
end
end
- local wait, done = async.waiter();
+ local wait, done = async.waiter(1, true);
module:hook("s2s-closed", function ()
if next(sessions) == nil then done(); end
end, 1)