Comparison

core/sessionmanager.lua @ 6663:d3023dd07cb6

portmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager, util.xml: Add luacheck annotations
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 May 2015 19:20:07 +0100
parent 6619:78d1706982b2
child 6676:a536978e0f01
comparison
equal deleted inserted replaced
6662:5ef319efedba 6663:d3023dd07cb6
52 destroyed = true; 52 destroyed = true;
53 type = "c2s_destroyed"; 53 type = "c2s_destroyed";
54 close = function (session) 54 close = function (session)
55 session.log("debug", "Attempt to close already-closed session"); 55 session.log("debug", "Attempt to close already-closed session");
56 end; 56 end;
57 filter = function (type, data) return data; end; 57 filter = function (type, data) return data; end; --luacheck: ignore 212/type
58 }; resting_session.__index = resting_session; 58 }; resting_session.__index = resting_session;
59 59
60 function retire_session(session) 60 function retire_session(session)
61 local log = session.log or log; 61 local log = session.log or log; --luacheck: ignore 431/log
62 for k in pairs(session) do 62 for k in pairs(session) do
63 if k ~= "log" and k ~= "id" then 63 if k ~= "log" and k ~= "id" then
64 session[k] = nil; 64 session[k] = nil;
65 end 65 end
66 end 66 end