aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-17 21:40:06 +0200
committerKim Alvefur <zash@zash.se>2017-04-17 21:40:06 +0200
commitac8f0e795fc916aa91a41d9f90a10396a737651c (patch)
treefb838766eab152d90ccfa8a2b62bca61c080d159 /plugins
parent12e5d691c25fddbcb8ff2e24583cc2a3ffa651e1 (diff)
downloadprosody-ac8f0e795fc916aa91a41d9f90a10396a737651c.tar.gz
prosody-ac8f0e795fc916aa91a41d9f90a10396a737651c.zip
mod_bosh: Update session.conn to point to the current connection (fixes #890)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bosh.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index d9c8defd..1eb95e90 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -247,7 +247,7 @@ function stream_callbacks.streamopened(context, attr)
-- New session
sid = new_uuid();
local session = {
- type = "c2s_unauthed", conn = {}, sid = sid, rid = tonumber(attr.rid)-1, host = attr.to,
+ type = "c2s_unauthed", conn = request.conn, sid = sid, rid = tonumber(attr.rid)-1, host = attr.to,
bosh_version = attr.ver, bosh_wait = math_min(attr.wait, bosh_max_wait), streamid = sid,
bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY,
requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream,
@@ -316,6 +316,8 @@ function stream_callbacks.streamopened(context, attr)
context.notopen = nil;
return;
end
+
+ session.conn = request.conn;
if session.rid then
local rid = tonumber(attr.rid);