Comparison

core/sessionmanager.lua @ 124:7fee6b63abca

faster checking for other sessions
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Oct 2008 17:27:41 +0100
parent 123:ebd65feb188c
child 125:6b6b8f4ab7e3
comparison
equal deleted inserted replaced
123:ebd65feb188c 124:7fee6b63abca
40 hosts[session.host].sessions[session.username].sessions[session.resource] = nil; 40 hosts[session.host].sessions[session.username].sessions[session.resource] = nil;
41 end 41 end
42 local nomore = true; 42 local nomore = true;
43 for res, ssn in pairs(hosts[session.host].sessions[session.username]) do 43 for res, ssn in pairs(hosts[session.host].sessions[session.username]) do
44 nomore = false; 44 nomore = false;
45 break;
45 end 46 end
46 if nomore then 47 if nomore then
47 hosts[session.host].sessions[session.username] = nil; 48 hosts[session.host].sessions[session.username] = nil;
48 end 49 end
49 end 50 end