aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-06-05 11:48:57 +0100
committerMatthew Wild <mwild1@gmail.com>2011-06-05 11:48:57 +0100
commit3df725786b93b54f681fd0baa3f004c0d961488a (patch)
treee2108184222a74b41e467c6bdccc724ef01fa2e6 /plugins
parent57683f24cf25eb604c3a585c1fe46bd3065a31e7 (diff)
downloadprosody-3df725786b93b54f681fd0baa3f004c0d961488a.tar.gz
prosody-3df725786b93b54f681fd0baa3f004c0d961488a.zip
mod_bosh: Mark a session as active when a request comes in, even if we don't end up holding that request, fixes BOSH ghosts (thanks smoku)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bosh.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index a747f3cb..5ef6b18e 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -125,11 +125,11 @@ function handle_request(method, body, request)
local session = sessions[request.sid];
if session then
- -- Session was marked as inactive, since we have
- -- a request open now, unmark it
- if inactive_sessions[session] then
- inactive_sessions[session] = nil;
- end
+ -- Session was marked as inactive, since we have
+ -- a request open now, unmark it
+ if inactive_sessions[session] and #session.requests > 0 then
+ inactive_sessions[session] = nil;
+ end
local r = session.requests;
log("debug", "Session %s has %d out of %d requests open", request.sid, #r, session.bosh_hold);