From b4c427059aa39ce42ae4c82afcfe617dea255c4d Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Fri, 3 Apr 2020 03:48:38 -0400 Subject: [PATCH] clamp roundTripTime --- protocol.c | 1 + 1 file changed, 1 insertion(+) 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);