From 3fcb07f723ba79203c0fa93669173d7727711aa0 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 14 May 2021 18:46:49 -0500 Subject: [PATCH] fix RTO limit being exceeded --- protocol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protocol.c b/protocol.c index 8b3c3db6..2bef4bc1 100644 --- a/protocol.c +++ b/protocol.c @@ -1368,6 +1368,8 @@ enet_protocol_check_timeouts (ENetHost * host, ENetPeer * peer, ENetEvent * even ++ peer -> packetsLost; outgoingCommand -> roundTripTimeout *= 2; + if (outgoingCommand -> roundTripTimeout > outgoingCommand -> roundTripTimeoutLimit) + outgoingCommand -> roundTripTimeout = outgoingCommand -> roundTripTimeoutLimit; enet_list_insert (insertPosition, enet_list_remove (& outgoingCommand -> outgoingCommandList));