Software /
code /
prosody
Diff
plugins/mod_bosh.lua @ 3492:6d782b1fcc8a
mod_bosh: Fix traceback when initiating a BOSH session to an unknown host
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 10 Sep 2010 17:56:24 +0100 |
parent | 3472:61cf3e7d7f07 |
child | 3542:2acaf129e1c3 |
line wrap: on
line diff
--- 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