aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-02-22 12:35:31 +0100
committerKim Alvefur <zash@zash.se>2022-02-22 12:35:31 +0100
commit1d20ec63e66f04d0da8470d2f06c98be25960de7 (patch)
tree10f550ed2d23916e6940418d7aa09223c954c98b /plugins
parente725335ed389622ebad4b84997e9bd22bd2e6a7b (diff)
downloadprosody-1d20ec63e66f04d0da8470d2f06c98be25960de7.tar.gz
prosody-1d20ec63e66f04d0da8470d2f06c98be25960de7.zip
mod_c2s,mod_s2s: Wrap callback to improve tracebacks
Should make traces point here instead of timer dispatch, making debugging easier
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_c2s.lua2
-rw-r--r--plugins/mod_s2s.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 33fd7a0a..8b06fe8a 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -446,7 +446,7 @@ module:hook("server-stopping", function(event)
-- Wait for them to close properly if they haven't already
if next(sessions) ~= nil then
- add_task(stream_close_timeout+1, done);
+ add_task(stream_close_timeout+1, function () done() end);
module:log("info", "Waiting for sessions to close");
wait();
end
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index 836cf347..e539082d 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -987,7 +987,7 @@ module:hook("server-stopping", function(event)
-- Wait for them to close properly if they haven't already
if next(sessions) ~= nil then
module:log("info", "Waiting for sessions to close");
- add_task(stream_close_timeout + 1, done);
+ add_task(stream_close_timeout + 1, function () done() end);
wait();
end