fixed connection issues
This commit is contained in:
parent
0a762eef76
commit
dd0eaf33e5
@ -228,25 +228,16 @@ void VoiceClientConnection::handleDatagramReceived(const pipes::buffer_view& buf
|
|||||||
} else {
|
} else {
|
||||||
//TODO: Needs rethinking because read_queue.push_back increases the index, but this has not to be the packet id
|
//TODO: Needs rethinking because read_queue.push_back increases the index, but this has not to be the packet id
|
||||||
if(!read_queue.push_back(move(packet))) {
|
if(!read_queue.push_back(move(packet))) {
|
||||||
debugMessage(this->client->getServerId(), "{} Got unordered packet of type {} which is out of the buffer range of {}. Packet ID: {}, Full index: {}. Dropping packet",
|
debugMessage(this->client->getServerId(), "{} Got unordered packet of type {} which is out of the buffer range of {}. Packet ID: {}. Dropping packet.",
|
||||||
CLIENT_STR_LOG_PREFIX_(this->client),
|
CLIENT_STR_LOG_PREFIX_(this->client),
|
||||||
packet_type.name(),
|
packet_type.name(),
|
||||||
read_queue.capacity(),
|
read_queue.capacity(),
|
||||||
packet_id,
|
packet_id,
|
||||||
read_queue.full_index()
|
read_queue.full_index()
|
||||||
);
|
);
|
||||||
if(read_queue.current_index() < packet_id) {
|
}
|
||||||
logWarning(this->client->getServerId(), "{} Unordered packet queue index increased from {} to {} for type {}",
|
{
|
||||||
CLIENT_STR_LOG_PREFIX_(this->client),
|
//A max entropie of 16 packets should not happen. This indicates more that 16 or more packets got lost
|
||||||
read_queue.current_index(),
|
|
||||||
packet_id,
|
|
||||||
packet_type.name()
|
|
||||||
);
|
|
||||||
read_queue.set_full_index_to(packet_id);
|
|
||||||
}
|
|
||||||
/* return; dont stop here because we've to progress the packets */
|
|
||||||
} else {
|
|
||||||
//Allowing that the packet id pointer is lower then the actual packet ids.
|
|
||||||
auto current_index = read_queue.current_index();
|
auto current_index = read_queue.current_index();
|
||||||
if(current_index + 16 < packet_id)
|
if(current_index + 16 < packet_id)
|
||||||
read_queue.set_full_index_to(packet_id);
|
read_queue.set_full_index_to(packet_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user