# HG changeset patch # User Matthew Wild # Date 1274092973 -3600 # Node ID 2fef108d7eb79eb0629af9a175edbce7cdda04e6 # Parent b5beb7b15ac489363ec8b430158bf972479d9d68 mod_bosh: Remove requests from the session table using table.remove(), prevents the possibility of holes in the array. diff -r b5beb7b15ac4 -r 2fef108d7eb7 plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Fri May 07 16:10:04 2010 +0500 +++ b/plugins/mod_bosh.lua Mon May 17 11:42:53 2010 +0100 @@ -47,8 +47,11 @@ local session = sessions[request.sid]; if session then local requests = session.requests; - for i,r in pairs(requests) do - if r == request then requests[i] = nil; break; end + for i,r in ipairs(requests) do + if r == request then + t_remove(requests, i); + break; + end end -- If this session now has no requests open, mark it as inactive