Mercurial > prosody-hg
comparison plugins/mod_bosh.lua @ 8752:8f2da579a790
mod_bosh: Increase number of stored responses to ensure we always keep responses within the rid window available
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 11 Apr 2018 13:24:37 +0100 |
| parents | f91d45a692f0 |
| children | d5ff0982d3e6 |
comparison
equal
deleted
inserted
replaced
| 8751:469f78fe1c3e | 8752:8f2da579a790 |
|---|---|
| 285 sid = new_uuid(); | 285 sid = new_uuid(); |
| 286 local session = { | 286 local session = { |
| 287 type = "c2s_unauthed", conn = request.conn, sid = sid, host = attr.to, | 287 type = "c2s_unauthed", conn = request.conn, sid = sid, host = attr.to, |
| 288 rid = rid - 1, -- Hack for initial session setup, "previous" rid was $current_request - 1 | 288 rid = rid - 1, -- Hack for initial session setup, "previous" rid was $current_request - 1 |
| 289 bosh_version = attr.ver, bosh_wait = wait, streamid = sid, | 289 bosh_version = attr.ver, bosh_wait = wait, streamid = sid, |
| 290 bosh_max_inactive = bosh_max_inactivity, bosh_responses = cache.new(BOSH_HOLD):table(); | 290 bosh_max_inactive = bosh_max_inactivity, bosh_responses = cache.new(BOSH_HOLD+1):table(); |
| 291 requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, | 291 requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, |
| 292 close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true, | 292 close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true, |
| 293 log = logger.init("bosh"..sid), secure = consider_bosh_secure or request.secure, | 293 log = logger.init("bosh"..sid), secure = consider_bosh_secure or request.secure, |
| 294 ip = request.ip; | 294 ip = request.ip; |
| 295 }; | 295 }; |
