aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_debug_reset.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-04-06 14:17:50 +0100
committerMatthew Wild <mwild1@gmail.com>2023-04-06 14:17:50 +0100
commit72c5ac4054d5a12d0781a626d0ed875d8dd22324 (patch)
tree89c5a800dd4ae64f11b36b0d95224a6982c1bc05 /plugins/mod_debug_reset.lua
parent00dfd64a86f5ee5053beeb02b868b7594f3dc597 (diff)
downloadprosody-72c5ac4054d5a12d0781a626d0ed875d8dd22324.tar.gz
prosody-72c5ac4054d5a12d0781a626d0ed875d8dd22324.zip
mod_debug_reset: Don't delay operations until next tick
For some unknown reason, this was required with the old mock util.time functions prior to 012d6e7b723a. After 012d6e7b723a, it breaks. So I'm happy to revert to not delaying anything. This makes tests pass again.
Diffstat (limited to 'plugins/mod_debug_reset.lua')
-rw-r--r--plugins/mod_debug_reset.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/mod_debug_reset.lua b/plugins/mod_debug_reset.lua
index 9ff465eb..eb54c400 100644
--- a/plugins/mod_debug_reset.lua
+++ b/plugins/mod_debug_reset.lua
@@ -18,18 +18,16 @@ local function do_reset()
module:fire_event("server-resetting");
for _, host in ipairs(hosts) do
hostmanager.deactivate(host);
- timer.add_task(0, function ()
- hostmanager.activate(host);
- module:log("info", "Reset complete");
- module:fire_event("server-reset");
- end);
+ hostmanager.activate(host);
+ module:log("info", "Reset complete");
+ module:fire_event("server-reset");
end
end
function module.add_host(host_module)
host_module:hook("resource-unbind", function ()
if next(prosody.full_sessions) == nil then
- timer.add_task(0, do_reset);
+ do_reset();
end
end);
end