Automatically disable QoS tagging on the server-side too for blackhole router scenarios

Also bump the threshold for QoS disablement to 3 losses to avoid unnecessary fallbacks on the server side.
This commit is contained in:
Cameron Gutman
2024-01-31 23:31:04 -06:00
parent acf813c4aa
commit f6e67b1138
+2 -2
View File
@@ -1725,8 +1725,8 @@ enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int ch
currentPeer -> lastSendTime = host -> serviceTime;
if (currentPeer -> state == ENET_PEER_STATE_CONNECTING && currentPeer -> packetsLost == 2) {
// Disable QoS tagging if we don't get a response to 2 connection requests in a row.
if ((currentPeer -> state == ENET_PEER_STATE_CONNECTING || currentPeer -> state == ENET_PEER_STATE_ACKNOWLEDGING_CONNECT) && currentPeer -> packetsLost == 3) {
// Disable QoS tagging if we don't get a response to 3 connection requests/acks in a row.
// Some networks drop QoS tagged packets, so let's try without it.
enet_socket_set_option (host -> socket, ENET_SOCKOPT_QOS, 0);
}