Disable QoS tagging if 2 connect packets in a row are dropped
This commit is contained in:
@@ -1718,6 +1718,12 @@ 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.
|
||||
// Some networks drop QoS tagged packets, so let's try without it.
|
||||
enet_socket_set_option (host -> socket, ENET_SOCKOPT_QOS, 0);
|
||||
}
|
||||
|
||||
sentLength = enet_socket_send (host -> socket, & currentPeer -> address, host -> buffers, host -> bufferCount);
|
||||
|
||||
enet_protocol_remove_sent_unreliable_commands (currentPeer);
|
||||
|
||||
Reference in New Issue
Block a user