From c20ca391e2e93abd275096f8c9423d5ba8aa05e8 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 7733256..358691b 100644 --- a/protocol.c +++ b/protocol.c @@ -1364,6 +1364,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));