Diff

plugins/mod_bosh.lua @ 4316:2478698bdc52

Merge 0.8->trunk
author Matthew Wild <mwild1@gmail.com>
date Tue, 07 Jun 2011 01:29:34 +0100
parent 4223:9fb6e8ec15ed
parent 4313:42d7d09fdda0
child 4327:98ae0d0b4d07
line wrap: on
line diff
--- a/plugins/mod_bosh.lua	Sun Jun 05 23:55:16 2011 +0100
+++ b/plugins/mod_bosh.lua	Tue Jun 07 01:29:34 2011 +0100
@@ -125,11 +125,11 @@
 	
 	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);