aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/sessionmanager.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index a4fb8a87..19614311 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -39,12 +39,7 @@ function destroy_session(session)
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