aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-09-10 17:56:24 +0100
committerMatthew Wild <mwild1@gmail.com>2010-09-10 17:56:24 +0100
commit36e12ad74af32b2c297ae96349bcf9b4fd9ed1d9 (patch)
tree090dd3f84008b8c954e5b8fec2f298ff7da4e0e3
parent40fa07ecfcaadba2d256b3e092cba17fcb478f7c (diff)
downloadprosody-36e12ad74af32b2c297ae96349bcf9b4fd9ed1d9.tar.gz
prosody-36e12ad74af32b2c297ae96349bcf9b4fd9ed1d9.zip
mod_bosh: Fix traceback when initiating a BOSH session to an unknown host
-rw-r--r--plugins/mod_bosh.lua6
1 files changed, 3 insertions, 3 deletions
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