diff options
author | Lee Salzman <[email protected]> | 2020-09-01 00:26:10 -0400 |
---|---|---|
committer | Lee Salzman <[email protected]> | 2020-09-01 00:26:10 -0400 |
commit | bde113ef56393066601b8d21b6c8ffc9bfea53f2 (patch) | |
tree | f0b5552f4acf5b85e31ce961e6a415361362efab /protocol.c | |
parent | e55d226969300fbd3f1308afd8bf69e423012f2e (diff) | |
download | enet-bde113ef56393066601b8d21b6c8ffc9bfea53f2.tar.gz enet-bde113ef56393066601b8d21b6c8ffc9bfea53f2.zip |
clamp minimum highest RTT variance
Diffstat (limited to 'protocol.c')
-rw-r--r-- | protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -890,7 +890,7 @@ enet_protocol_handle_acknowledge (ENetHost * host, ENetEvent * event, ENetPeer * peer -> lastRoundTripTime = peer -> lowestRoundTripTime; peer -> lastRoundTripTimeVariance = ENET_MAX (peer -> highestRoundTripTimeVariance, (peer -> lowestRoundTripTime + 15) / 16); peer -> lowestRoundTripTime = peer -> roundTripTime; - peer -> highestRoundTripTimeVariance = peer -> roundTripTimeVariance; + peer -> highestRoundTripTimeVariance = ENET_MAX (peer -> roundTripTimeVariance, 2); peer -> packetThrottleEpoch = host -> serviceTime; } |