From bf059aa4558801f219c1f8ba91e070a350b3c946 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sat, 17 Oct 2009 23:48:30 +0500 Subject: modulemanager: Slightly rearranged code for more robust unloading of modules. --- core/modulemanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 312ca738..9e93ffba 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -170,7 +170,6 @@ function unload(host, name, ...) log("warn", "Non-fatal error unloading module '%s' on '%s': %s", name, host, err); end end - modulemap[host][name] = nil; local params = handler_table:get(host, name); -- , {module.host, origin_type, tag, xmlns} for _, param in pairs(params or NULL) do local handlers = stanza_handlers:get(param[1], param[2], param[3], param[4]); @@ -187,6 +186,7 @@ function unload(host, name, ...) end end hooks:remove(host, name); + modulemap[host][name] = nil; return true; end -- cgit v1.2.3