Software /
code /
prosody
Changeset
125:6b6b8f4ab7e3
even faster checking for other sessions... thank you waqas :)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 23 Oct 2008 17:34:10 +0100 |
parents | 124:7fee6b63abca |
children | 126:63863534b1f1 135:bf10d42dd41b |
files | core/sessionmanager.lua |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/core/sessionmanager.lua Thu Oct 23 17:27:41 2008 +0100 +++ b/core/sessionmanager.lua Thu Oct 23 17:34:10 2008 +0100 @@ -39,12 +39,7 @@ if session.resource then hosts[session.host].sessions[session.username].sessions[session.resource] = nil; end - local nomore = true; - for res, ssn in pairs(hosts[session.host].sessions[session.username]) do - nomore = false; - break; - end - if nomore then + if not next(hosts[session.host].sessions[session.username], nil) then hosts[session.host].sessions[session.username] = nil; end end