plugins/mod_bosh.lua
changeset 8527 81fff93d3bc6
parent 8526 30671b378ab5
child 8528 7be8f649d97d
--- a/plugins/mod_bosh.lua	Wed Dec 13 15:24:02 2017 +0100
+++ b/plugins/mod_bosh.lua	Wed Dec 13 15:34:53 2017 +0100
@@ -6,7 +6,6 @@
 -- COPYING file in the source package for more information.
 --
 
-local hosts = _G.hosts;
 local new_xmpp_stream = require "util.xmppstream".new;
 local sm = require "core.sessionmanager";
 local sm_destroy_session = sm.destroy_session;
@@ -283,7 +282,7 @@
 				["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" });
 			response:send(tostring(close_reply));
 			return;
-		elseif not hosts[to_host] then
+		elseif to_host ~= module.host then
 			-- Unknown host
 			log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to));
 			local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate",