aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2020-04-03 03:48:38 -0400
committerLee Salzman <[email protected]>2020-04-03 03:48:38 -0400
commitb4c427059aa39ce42ae4c82afcfe617dea255c4d (patch)
tree9a19ea2f80334abaffb75da090155aba759764a1
parent6537dc81f36ff9c8d5c5a0f53950e4d39b374475 (diff)
downloadenet-b4c427059aa39ce42ae4c82afcfe617dea255c4d.tar.gz
enet-b4c427059aa39ce42ae4c82afcfe617dea255c4d.zip
clamp roundTripTime
-rw-r--r--protocol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/protocol.c b/protocol.c
index afdef99..885bb72 100644
--- a/protocol.c
+++ b/protocol.c
@@ -852,6 +852,7 @@ enet_protocol_handle_acknowledge (ENetHost * host, ENetEvent * event, ENetPeer *
return 0;
roundTripTime = ENET_TIME_DIFFERENCE (host -> serviceTime, receivedSentTime);
+ roundTripTime = ENET_MAX (roundTripTime, 1);
enet_peer_throttle (peer, roundTripTime);