core/componentmanager.lua

changeset 982
dbbeb73952e6
parent 970
5516f9e66482
child 983
460429a59c83
--- a/core/componentmanager.lua	Sat Apr 11 22:22:24 2009 +0100
+++ b/core/componentmanager.lua	Sat Apr 11 22:23:49 2009 +0100
@@ -14,6 +14,7 @@
 local eventmanager = require "core.eventmanager";
 local modulemanager = require "core.modulemanager";
 local jid_split = require "util.jid".split;
+local st = require "util.stanza";
 local hosts = hosts;
 
 local pairs, type, tostring = pairs, type, tostring;
@@ -35,7 +36,10 @@
 module "componentmanager"
 
 local function default_component_handler(origin, stanza)
-	origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable"));
+	log("warn", "Stanza being handled by default component, bouncing error");
+	if stanza.attr.type ~= "error" then
+		origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable"));
+	end
 end
 
 

mercurial