Commit f56ac824 authored by jan.koester's avatar jan.koester
Browse files

test

parent 64286d73
Loading
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -505,13 +505,17 @@ const authdb::SessionData *authdb::ClusterSession::getSession(uuid::uuid session
            if (g_Cluster && g_Cluster->isRunning() && !g_Cluster->isDegraded()) {
                auto age = std::chrono::duration_cast<std::chrono::seconds>(
                    std::chrono::steady_clock::now() - cur->_lastClusterSync).count();
                std::cerr << "[SESSION] getSession: cluster sync age=" << age
                          << "s degraded=" << g_Cluster->isDegraded() << std::endl;
                if (age >= 5) {
                    uuid::uuid c_sid, c_uid, c_did;
                    std::vector<uuid::uuid> c_members;
                    std::string c_username;
                    std::vector<std::pair<uuid::uuid, bool>> c_gpo;
                    if (g_Cluster->fetchSessionLocalBySid(sessionid, c_sid, c_uid, c_did,
                                                          c_members, c_username, c_gpo)) {
                    bool localOk = g_Cluster->fetchSessionLocalBySid(sessionid, c_sid, c_uid, c_did,
                                                          c_members, c_username, c_gpo);
                    std::cerr << "[SESSION] getSession: fetchLocalBySid=" << localOk << std::endl;
                    if (localOk) {
                        cur->_members = c_members;
                        cur->_username = c_username;
                        cur->setGPOResults(c_gpo);