diff options
author | Lee Salzman <[email protected]> | 2020-07-24 01:50:34 -0400 |
---|---|---|
committer | Lee Salzman <[email protected]> | 2020-07-24 01:50:34 -0400 |
commit | eda26a26d913a1e86f44fae725049c97dc1ce5a8 (patch) | |
tree | e75381548ef79e7b71b2f18d7084d1b23c848604 /protocol.c | |
parent | 4f3dbbaeb19a54a09cd4a984c8c5107436a2b197 (diff) | |
download | enet-eda26a26d913a1e86f44fae725049c97dc1ce5a8.tar.gz enet-eda26a26d913a1e86f44fae725049c97dc1ce5a8.zip |
clamp throttle variance from below based on RTT percentage
Diffstat (limited to 'protocol.c')
-rw-r--r-- | protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -888,7 +888,7 @@ enet_protocol_handle_acknowledge (ENetHost * host, ENetEvent * event, ENetPeer * ENET_TIME_DIFFERENCE (host -> serviceTime, peer -> packetThrottleEpoch) >= peer -> packetThrottleInterval) { peer -> lastRoundTripTime = peer -> lowestRoundTripTime; - peer -> lastRoundTripTimeVariance = ENET_MAX (peer -> highestRoundTripTimeVariance, 2); + peer -> lastRoundTripTimeVariance = ENET_MAX (peer -> highestRoundTripTimeVariance, (peer -> lowestRoundTripTime + 31) / 32); peer -> lowestRoundTripTime = peer -> roundTripTime; peer -> highestRoundTripTimeVariance = peer -> roundTripTimeVariance; peer -> packetThrottleEpoch = host -> serviceTime; |