plugins/mod_bosh.lua
changeset 13464 a688947fab1e
parent 13297 ad1ed84fdf13
equal deleted inserted replaced
13463:790f60c0843b 13464:a688947fab1e
   323 
   323 
   324 		-- New session
   324 		-- New session
   325 		sid = new_uuid();
   325 		sid = new_uuid();
   326 		-- TODO use util.session
   326 		-- TODO use util.session
   327 		local session = {
   327 		local session = {
   328 			type = "c2s_unauthed", conn = request.conn, sid = sid, host = attr.to,
   328 			base_type = "c2s", type = "c2s_unauthed", conn = request.conn, sid = sid, host = attr.to,
   329 			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
   330 			bosh_version = attr.ver, bosh_wait = wait, streamid = sid,
   330 			bosh_version = attr.ver, bosh_wait = wait, streamid = sid,
   331 			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();
   332 			requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream,
   332 			requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream,
   333 			close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true,
   333 			close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true,