Comparison

plugins/mod_bosh.lua @ 11733:27699cc148df

mod_bosh: Add todo to use util.session to create session object So that we get single point where shared session properties can be added. But not now. One day. Maybe. Patches welcome.
author Kim Alvefur <zash@zash.se>
date Thu, 29 Jul 2021 20:04:57 +0200
parent 11727:f3aee8a825cc
child 11771:4c0802b52673
comparison
equal deleted inserted replaced
11732:5735f931f5c4 11733:27699cc148df
321 321
322 wait = math_min(wait, bosh_max_wait); 322 wait = math_min(wait, bosh_max_wait);
323 323
324 -- New session 324 -- New session
325 sid = new_uuid(); 325 sid = new_uuid();
326 -- TODO use util.sesssion
326 local session = { 327 local session = {
327 type = "c2s_unauthed", conn = request.conn, sid = sid, host = attr.to, 328 type = "c2s_unauthed", conn = request.conn, sid = sid, host = attr.to,
328 rid = rid - 1, -- Hack for initial session setup, "previous" rid was $current_request - 1 329 rid = rid - 1, -- Hack for initial session setup, "previous" rid was $current_request - 1
329 bosh_version = attr.ver, bosh_wait = wait, streamid = sid, 330 bosh_version = attr.ver, bosh_wait = wait, streamid = sid,
330 bosh_max_inactive = bosh_max_inactivity, bosh_responses = cache.new(BOSH_HOLD+1):table(); 331 bosh_max_inactive = bosh_max_inactivity, bosh_responses = cache.new(BOSH_HOLD+1):table();