Comparison

plugins/mod_bosh.lua @ 7387:addd041342bd

mod_bosh: Don't decrement rid twice (thanks av6)
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 17:44:04 +0200
parent 7381:a05bf94646ba
child 7388:77a3ef937152
child 7651:55f11a6806bc
comparison
equal deleted inserted replaced
7385:17929cdacec2 7387:addd041342bd
273 wait = math_min(wait, bosh_max_wait); 273 wait = math_min(wait, bosh_max_wait);
274 274
275 -- New session 275 -- New session
276 sid = new_uuid(); 276 sid = new_uuid();
277 local session = { 277 local session = {
278 type = "c2s_unauthed", conn = {}, sid = sid, rid = rid-1, host = attr.to, 278 type = "c2s_unauthed", conn = {}, sid = sid, rid = rid, host = attr.to,
279 bosh_version = attr.ver, bosh_wait = wait, streamid = sid, 279 bosh_version = attr.ver, bosh_wait = wait, streamid = sid,
280 bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY, 280 bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY,
281 requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, 281 requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream,
282 close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true, 282 close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true,
283 log = logger.init("bosh"..sid), secure = consider_bosh_secure or request.secure, 283 log = logger.init("bosh"..sid), secure = consider_bosh_secure or request.secure,