aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-08-11 19:48:41 +0100
committerMatthew Wild <mwild1@gmail.com>2009-08-11 19:48:41 +0100
commitd1a1b9e6d47c3fe2cb99bea649792a6a00f0a23b (patch)
treef6f75aa09977dbb5d42394fb35e3762d4a9ab4d6
parentfcfb1213d2cbc6b880bfd4e5475e5494e3af792a (diff)
downloadprosody-d1a1b9e6d47c3fe2cb99bea649792a6a00f0a23b.tar.gz
prosody-d1a1b9e6d47c3fe2cb99bea649792a6a00f0a23b.zip
mod_bosh: Correct reply when closing sessions
-rw-r--r--plugins/mod_bosh.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 615ad30b..1e3fd7ae 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -31,6 +31,7 @@ local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) o
local BOSH_DEFAULT_MAXPAUSE = tonumber(module:get_option("bosh_max_pause")) or 300;
local default_headers = { ["Content-Type"] = "text/xml; charset=utf-8" };
+local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }), attr = {} };
local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat;
local os_time = os.time;
@@ -110,11 +111,9 @@ end
local function bosh_reset_stream(session) session.notopen = true; end
-local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }), attr = {} };
local function bosh_close_stream(session, reason)
(session.log or log)("info", "BOSH client disconnected");
session_close_reply.attr.condition = reason;
- local session_close_reply = tostring(session_close_reply);
for _, held_request in ipairs(session.requests) do
held_request:send(session_close_reply);
held_request:destroy();