Loading src/session.cpp +14 −0 Changes for src/session.cpp: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -419,6 +419,13 @@ authdb::ClusterSession::ClusterSession() : LocalSession() {} authdb::ClusterSession::~ClusterSession() {} const authdb::SessionData *authdb::ClusterSession::addSession(AuthBackend &backend,uuid::uuid domainid,uuid::uuid userid){ // Reject if cluster is not available — session would not replicate if (!g_Cluster || !g_Cluster->isRunning()) { throw AuthBackendError("cluster not ready — please try again later"); } else if (g_Cluster->isCritical()) { throw AuthBackendError("cluster critical — too few nodes online, please try again later"); } // Check cluster for existing session if (g_Cluster && g_Cluster->isRunning()) { uuid::uuid cluster_sid; Loading Loading @@ -490,6 +497,13 @@ const authdb::SessionData *authdb::ClusterSession::addSession(AuthBackend &backe } const authdb::SessionData *authdb::ClusterSession::getSession(uuid::uuid sessionid){ // Reject if cluster is not available if (!g_Cluster || !g_Cluster->isRunning()) { throw AuthBackendError("cluster not ready — please try again later"); } else if (g_Cluster->isCritical()) { throw AuthBackendError("cluster critical — too few nodes online, please try again later"); } // Check temp cache first (TTL 5 seconds) { std::lock_guard<std::mutex> guard(_lock); Loading Loading
src/session.cpp +14 −0 Changes for src/session.cpp: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -419,6 +419,13 @@ authdb::ClusterSession::ClusterSession() : LocalSession() {} authdb::ClusterSession::~ClusterSession() {} const authdb::SessionData *authdb::ClusterSession::addSession(AuthBackend &backend,uuid::uuid domainid,uuid::uuid userid){ // Reject if cluster is not available — session would not replicate if (!g_Cluster || !g_Cluster->isRunning()) { throw AuthBackendError("cluster not ready — please try again later"); } else if (g_Cluster->isCritical()) { throw AuthBackendError("cluster critical — too few nodes online, please try again later"); } // Check cluster for existing session if (g_Cluster && g_Cluster->isRunning()) { uuid::uuid cluster_sid; Loading Loading @@ -490,6 +497,13 @@ const authdb::SessionData *authdb::ClusterSession::addSession(AuthBackend &backe } const authdb::SessionData *authdb::ClusterSession::getSession(uuid::uuid sessionid){ // Reject if cluster is not available if (!g_Cluster || !g_Cluster->isRunning()) { throw AuthBackendError("cluster not ready — please try again later"); } else if (g_Cluster->isCritical()) { throw AuthBackendError("cluster critical — too few nodes online, please try again later"); } // Check temp cache first (TTL 5 seconds) { std::lock_guard<std::mutex> guard(_lock); Loading