SOme updates

This commit is contained in:
WolverinDEV
2021-03-21 23:51:37 +01:00
parent fb517f0b72
commit ceb77a2c85
20 changed files with 80 additions and 33 deletions
+7 -2
View File
@@ -403,7 +403,9 @@ void SpeakingClient::processJoin() {
assert(ref_server);
this->resetIdleTime();
threads::MutexLock lock(this->command_lock); //Don't process any commands!
/* don't process any commands */
std::lock_guard command_lock_{this->command_lock};
if(this->state != ConnectionState::INIT_HIGH) {
logError(this->getServerId(), "{} Invalid processJoin() connection state!", CLIENT_STR_LOG_PREFIX);
@@ -507,7 +509,10 @@ void SpeakingClient::processJoin() {
unique_lock server_channel_lock(this->server->channel_tree_lock);
this->server->client_move(this->ref(), channel, nullptr, "", ViewReasonId::VREASON_USER_ACTION, false, server_channel_lock);
if(this->getType() != ClientType::CLIENT_TEAMSPEAK) this->subscribeChannel({this->currentChannel}, false, true); /* su "improve" the TS3 clients join speed we send the channel clients a bit later, when the TS3 client gets his own client variables */
if(this->getType() != ClientType::CLIENT_TEAMSPEAK) {
std::lock_guard own_channel_lock{this->channel_lock};
this->subscribeChannel({this->currentChannel}, false, true); /* su "improve" the TS3 clients join speed we send the channel clients a bit later, when the TS3 client gets his own client variables */
}
}
TIMING_STEP(timings, "join move ");