# HG changeset patch # User Kim Alvefur # Date 1492458006 -7200 # Node ID 8d1fd6d34bda2d74872f402f66e35888e2e316b8 # Parent 57060d0cee4b906ccc307f145ab3f53ba901a94c mod_bosh: Update session.conn to point to the current connection (fixes #890) diff -r 57060d0cee4b -r 8d1fd6d34bda plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Fri Mar 24 00:25:49 2017 +0100 +++ b/plugins/mod_bosh.lua Mon Apr 17 21:40:06 2017 +0200 @@ -247,7 +247,7 @@ -- 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 @@ context.notopen = nil; return; end + + session.conn = request.conn; if session.rid then local rid = tonumber(attr.rid);