plugins/mod_bosh.lua
changeset 11737 27699cc148df
parent 11731 f3aee8a825cc
child 11775 4c0802b52673
equal deleted inserted replaced
11736:5735f931f5c4 11737: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();