aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-04-10 20:30:20 +0100
committerMatthew Wild <mwild1@gmail.com>2018-04-10 20:30:20 +0100
commitbb7a427550037227e2a217bc5bbd40be373cfb4c (patch)
treedac28b72bfb4dec50569b7ffec3c87b69afc09b6 /plugins
parent5d92b43da7a2e9c41de07f8bcaed33ec44613494 (diff)
downloadprosody-bb7a427550037227e2a217bc5bbd40be373cfb4c.tar.gz
prosody-bb7a427550037227e2a217bc5bbd40be373cfb4c.zip
mod_bosh: Some additonal comments to improve code readability
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bosh.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 00fe62bb..082a24ed 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -369,13 +369,15 @@ function stream_callbacks.streamopened(context, attr)
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