fixed first instance setup miracle

This commit is contained in:
WolverinDEV 2019-07-21 10:57:01 +02:00
parent 98929707ae
commit d3cc5984e5
2 changed files with 2 additions and 1 deletions

View File

@ -111,7 +111,7 @@ InstanceHandler::InstanceHandler(SqlDataManager *sql) : sql(sql) {
this->groupManager = std::make_shared<GroupManager>(nullptr, this->getSql());
this->groupManager->loadGroupFormDatabase();
if (this->groupManager->availableServerGroups(false).empty()){
if (this->groupManager->availableServerGroups(false).empty()) {
if(!this->setupDefaultGroups()){
logCritical(LOG_INSTANCE, "Could not setup server instance! Stopping...");
mainThreadActive = false;

View File

@ -141,6 +141,7 @@ bool InstanceHandler::setupDefaultGroups() {
}
}
}
this->save_group_permissions();
this->getSql()->pool->threads()->wait_for(); //Wait for all permissions to flush
return true;
}