# HG changeset patch # User Matthew Wild # Date 1680787070 -3600 # Node ID b2e6a175537db0fc6f9be500568e29ea9e60093c # Parent 012d6e7b723af869378b3a99c38031647622b889 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. diff -r 012d6e7b723a -r b2e6a175537d plugins/mod_debug_reset.lua --- a/plugins/mod_debug_reset.lua Thu Apr 06 14:00:54 2023 +0100 +++ b/plugins/mod_debug_reset.lua Thu Apr 06 14:17:50 2023 +0100 @@ -18,18 +18,16 @@ 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