From 36e12ad74af32b2c297ae96349bcf9b4fd9ed1d9 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 10 Sep 2010 17:56:24 +0100 Subject: mod_bosh: Fix traceback when initiating a BOSH session to an unknown host --- plugins/mod_bosh.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index b9106083..4e78cd63 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -218,9 +218,9 @@ function stream_callbacks.streamopened(request, attr) 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 -- cgit v1.2.3