plugins/mod_bosh.lua

changeset 3492
6d782b1fcc8a
parent 3472
61cf3e7d7f07
child 3542
2acaf129e1c3
--- a/plugins/mod_bosh.lua	Thu Sep 09 20:10:28 2010 +0100
+++ b/plugins/mod_bosh.lua	Fri Sep 10 17:56:24 2010 +0100
@@ -218,9 +218,9 @@
 		if not hosts[attr.to] then
 			-- Unknown host
 			log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to));
-			session_close_reply.body.attr.condition = "host-unknown";
-			request:send(session_close_reply);
-			request.notopen = nil
+			local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate",
+				["xmlns:streams"] = xmlns_streams, condition = "host-unknown" });
+			request:send(tostring(close_reply));
 			return;
 		end
 		

mercurial