Software /
code /
prosody
Changeset
8746:df1ca586c68d
mod_bosh: Some additonal comments to improve code readability
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 10 Apr 2018 20:30:20 +0100 |
parents | 8745:e098c9b25014 |
children | 8747:f91d45a692f0 |
files | plugins/mod_bosh.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_bosh.lua Tue Apr 10 20:29:46 2018 +0100 +++ b/plugins/mod_bosh.lua Tue Apr 10 20:30:20 2018 +0100 @@ -369,13 +369,15 @@ if diff ~= 1 then context.sid = sid; context.notopen = nil; - if diff == 2 then + if diff == 2 then -- Missed a request -- Hold request, but don't process it (ouch!) session.log("debug", "rid skipped: %d, deferring this request", rid-1) context.defer = true; session.bosh_deferred = { context = context, sid = sid, rid = rid, terminate = attr.type == "terminate" }; return; end + -- Set a marker to indicate that stanzas in this request should NOT be processed + -- (these stanzas will already be in the XML parser's buffer) context.ignore = true; if diff == 0 then -- Re-send previous response, ignore stanzas in this request