fix excessive retransmissions when average RTT variance is 0
This commit is contained in:
+1
-1
@@ -1466,7 +1466,7 @@ enet_protocol_check_outgoing_commands (ENetHost * host, ENetPeer * peer)
|
||||
|
||||
if (outgoingCommand -> roundTripTimeout == 0)
|
||||
{
|
||||
outgoingCommand -> roundTripTimeout = peer -> roundTripTime + 4 * peer -> roundTripTimeVariance;
|
||||
outgoingCommand -> roundTripTimeout = peer -> roundTripTime + 4 * ENET_MAX (1, peer -> roundTripTimeVariance);
|
||||
outgoingCommand -> roundTripTimeoutLimit = peer -> timeoutLimit * outgoingCommand -> roundTripTimeout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user