Merged with master

This commit is contained in:
WolverinDEV
2019-09-14 17:42:43 +02:00
13 changed files with 457 additions and 323 deletions
+2 -2
View File
@@ -347,7 +347,7 @@ CommandResult SpeakingClient::handleCommandClientInit(Command& cmd) {
TIMING_START(timings);
if(!DatabaseHelper::assignDatabaseId(this->server->getSql(), this->server->getServerId(), _this.lock())) return {findError("vs_critical"), "Could not assign database id!"};
TIMING_STEP(timings, "db assign ");
this->server->getGroupManager()->enableCache(_this.lock());
this->server->getGroupManager()->enableCache(this->getClientDatabaseId());
TIMING_STEP(timings, "gr cache ");
const static vector<string> available_parameters = {
@@ -717,7 +717,7 @@ void SpeakingClient::processLeave() {
unique_lock server_channel_lock(this->server->channel_tree_lock);
server->unregisterClient(ownLock, "disconnected", server_channel_lock); /* already moves client to void if needed */
}
server->groups->disableCache(ownLock);
server->groups->disableCache(ownLock->getClientDatabaseId());
server->musicManager->cleanup_client_bots(this->getClientDatabaseId());
//ref_server = nullptr; Removed caused nullptr exceptions
}