plugins/mod_bosh.lua
changeset 11130 cc6b1dab01a2
parent 11129 5bcddab1659b
child 11395 8eff5c744395
--- a/plugins/mod_bosh.lua	Sat Oct 03 15:07:48 2020 +0200
+++ b/plugins/mod_bosh.lua	Sat Oct 03 15:09:12 2020 +0200
@@ -293,6 +293,7 @@
 
 		if not prosody.hosts[to_host] then
 			log("debug", "BOSH client tried to connect to non-existant host: %s", attr.to);
+			report_bad_host();
 			local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate",
 				["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" });
 			response:send(tostring(close_reply));
@@ -301,6 +302,7 @@
 
 		if prosody.hosts[to_host].type ~= "local" then
 			log("debug", "BOSH client tried to connect to %s host: %s", prosody.hosts[to_host].type, attr.to);
+			report_bad_host();
 			local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate",
 				["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" });
 			response:send(tostring(close_reply));