mirror of
https://github.com/znc/znc.git
synced 2026-05-09 06:44:40 +02:00
GetSession(): Properly cache the result
This function caches its result for not-logged-in users since r1857. With this commit, it also now works properly for logged-in ones. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1862 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -666,6 +666,7 @@ CSmartPtr<CWebSession> CWebSock::GetSession() {
|
||||
if (pSession != NULL) {
|
||||
// Refresh the timeout
|
||||
m_mspSessions.AddItem((*pSession)->GetId(), *pSession);
|
||||
m_spSession = *pSession;
|
||||
DEBUG("Found existing session from cookie: [" + sCookieSessionId + "] IsLoggedIn(" + CString((*pSession)->IsLoggedIn() ? "true" : "false") + ")");
|
||||
return *pSession;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user