aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_bosh.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-06-07 01:29:34 +0100
committerMatthew Wild <mwild1@gmail.com>2011-06-07 01:29:34 +0100
commit7d8433ac020c30ba9d3a73956ecabf6822e97d76 (patch)
treeb14478387b7fa4ac1cf1e954ca9515f983df0291 /plugins/mod_bosh.lua
parentcc5269517df6d8643437875bb49baec4bd3e6f87 (diff)
parent7c6db5e1b2d8579501981b1010574f0363330d28 (diff)
downloadprosody-7d8433ac020c30ba9d3a73956ecabf6822e97d76.tar.gz
prosody-7d8433ac020c30ba9d3a73956ecabf6822e97d76.zip
Merge 0.8->trunk
Diffstat (limited to 'plugins/mod_bosh.lua')
-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 c2c7eae9..a6b84367 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);