A lot of updates
This commit is contained in:
@@ -222,7 +222,7 @@ bool VoiceClientConnection::verify_encryption(const pipes::buffer_view &buffer /
|
||||
}
|
||||
|
||||
void VoiceClientConnection::execute_handle_command_packets(const std::chrono::system_clock::time_point& /* scheduled */) {
|
||||
if(this->client->state == ConnectionState::DISCONNECTED || !this->client->getServer())
|
||||
if(this->client->state >= ConnectionState::DISCONNECTING || !this->client->getServer())
|
||||
return;
|
||||
|
||||
//TODO: Remove the buffer_execute_lock and use the one within the this->client->handlePacketCommand method
|
||||
@@ -420,7 +420,7 @@ bool VoiceClientConnection::prepare_packet_for_write(vector<pipes::buffer> &resu
|
||||
|
||||
string error = "success";
|
||||
|
||||
if(packet->type().compressable() && !packet->memory_state.fragment_entry && false) {
|
||||
if(packet->type().compressable() && !packet->memory_state.fragment_entry) {
|
||||
packet->enable_flag(PacketFlag::Compressed);
|
||||
if(!this->compress_handler.progressPacketOut(packet.get(), error)) {
|
||||
logError(this->getClient()->getServerId(), "{} Could not compress outgoing packet.\nThis could cause fatal failed for the client.\nError: {}", error);
|
||||
@@ -627,8 +627,8 @@ bool VoiceClientConnection::wait_empty_write_and_prepare_queue(chrono::time_poin
|
||||
if(until.time_since_epoch().count() != 0 && system_clock::now() > until)
|
||||
return false;
|
||||
|
||||
};
|
||||
threads::self::sleep_for(milliseconds(5));
|
||||
threads::self::sleep_for(milliseconds(5));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user