clamp minimum highest RTT variance

This commit is contained in:
Lee Salzman 2020-09-01 00:26:10 -04:00
parent e55d226969
commit bde113ef56

View file

@ -890,7 +890,7 @@ enet_protocol_handle_acknowledge (ENetHost * host, ENetEvent * event, ENetPeer *
peer -> lastRoundTripTime = peer -> lowestRoundTripTime; peer -> lastRoundTripTime = peer -> lowestRoundTripTime;
peer -> lastRoundTripTimeVariance = ENET_MAX (peer -> highestRoundTripTimeVariance, (peer -> lowestRoundTripTime + 15) / 16); peer -> lastRoundTripTimeVariance = ENET_MAX (peer -> highestRoundTripTimeVariance, (peer -> lowestRoundTripTime + 15) / 16);
peer -> lowestRoundTripTime = peer -> roundTripTime; peer -> lowestRoundTripTime = peer -> roundTripTime;
peer -> highestRoundTripTimeVariance = peer -> roundTripTimeVariance; peer -> highestRoundTripTimeVariance = ENET_MAX (peer -> roundTripTimeVariance, 2);
peer -> packetThrottleEpoch = host -> serviceTime; peer -> packetThrottleEpoch = host -> serviceTime;
} }