diff loader.lua @ 14113:b9688ac25255 13.0

mod_admin_shell: Improve per-host command cleanup In some cases, host command handlers were not being cleaned up after the source module was unloaded, for example. This is because mod_admin_shell saw that the handler being removed did not match the installed handler. But this is expected for the new per-host commands, because the installed handler is a wrapper function which routes between the hosts. The wrapper function itself also held a reference via upvalue to the first command object which added it, just so it could read the argument names and such. This could cause command objects, and anything referenced by the handler, to stay around in memory longer than expected, even after a module has been unloaded or a host deactivated. The new logic breaks out the handler function to eliminate any unexpected upvalues. It improves the cleanup logic when a command is removed. Finally, it also cleans up commands when mod_admin_shell itself is unloaded.
author Matthew Wild <mwild1@gmail.com>
date Fri, 27 Mar 2026 12:43:10 +0000
parents ef586363d90f
children 76ece4dd9782
line wrap: on
line diff