aboutsummaryrefslogtreecommitdiffhomepage
path: root/peer.c
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2020-09-08 13:39:54 -0400
committerLee Salzman <[email protected]>2020-09-08 13:39:54 -0400
commit54dac7af816adceab77674fc0a83e94992801b24 (patch)
tree6e187ca4b5a43def41f4c80ccf94c09db74eb929 /peer.c
parentb63fd5256ad320ba02411cbb59ef52ab9e7b88cf (diff)
downloadenet-54dac7af816adceab77674fc0a83e94992801b24.tar.gz
enet-54dac7af816adceab77674fc0a83e94992801b24.zip
revert failed throttle changes
Diffstat (limited to 'peer.c')
-rw-r--r--peer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/peer.c b/peer.c
index b43beb7..9370ef4 100644
--- a/peer.c
+++ b/peer.c
@@ -66,7 +66,7 @@ enet_peer_throttle (ENetPeer * peer, enet_uint32 rtt)
peer -> packetThrottle = peer -> packetThrottleLimit;
}
else
- if (rtt <= peer -> lastRoundTripTime + (peer -> lastRoundTripTimeVariance + 1) / 2)
+ if (rtt <= peer -> lastRoundTripTime)
{
peer -> packetThrottle += peer -> packetThrottleAcceleration;
@@ -76,7 +76,7 @@ enet_peer_throttle (ENetPeer * peer, enet_uint32 rtt)
return 1;
}
else
- if (rtt >= peer -> lastRoundTripTime + 2 * peer -> lastRoundTripTimeVariance)
+ if (rtt > peer -> lastRoundTripTime + 2 * peer -> lastRoundTripTimeVariance)
{
if (peer -> packetThrottle > peer -> packetThrottleDeceleration)
peer -> packetThrottle -= peer -> packetThrottleDeceleration;
@@ -421,8 +421,6 @@ enet_peer_reset (ENetPeer * peer)
peer -> eventData = 0;
peer -> totalWaitingData = 0;
peer -> flags = 0;
- peer -> roundTripTimeRemainder = 0;
- peer -> roundTripTimeVarianceRemainder = 0;
memset (peer -> unsequencedWindow, 0, sizeof (peer -> unsequencedWindow));