Fix build after removal of roundTripTimeoutLimit
This commit is contained in:
+6
-3
@@ -1346,6 +1346,7 @@ enet_protocol_check_timeouts (ENetHost * host, ENetPeer * peer, ENetEvent * even
|
||||
{
|
||||
ENetOutgoingCommand * outgoingCommand;
|
||||
ENetListIterator currentCommand, insertPosition, insertSendReliablePosition;
|
||||
enet_uint32 roundTripTimeout;
|
||||
|
||||
currentCommand = enet_list_begin (& peer -> sentReliableCommands);
|
||||
insertPosition = enet_list_begin (& peer -> outgoingCommands);
|
||||
@@ -1376,9 +1377,11 @@ enet_protocol_check_timeouts (ENetHost * host, ENetPeer * peer, ENetEvent * even
|
||||
|
||||
++ peer -> packetsLost;
|
||||
|
||||
outgoingCommand -> roundTripTimeout *= 2;
|
||||
if (outgoingCommand -> roundTripTimeout > outgoingCommand -> roundTripTimeoutLimit)
|
||||
outgoingCommand -> roundTripTimeout = outgoingCommand -> roundTripTimeoutLimit;
|
||||
roundTripTimeout = peer -> roundTripTime + 4 * ENET_MAX (1, peer -> roundTripTimeVariance);
|
||||
if (outgoingCommand -> sendAttempts < peer -> timeoutLimit)
|
||||
outgoingCommand -> roundTripTimeout = roundTripTimeout * ENET_MAX (1, outgoingCommand -> sendAttempts);
|
||||
else
|
||||
outgoingCommand -> roundTripTimeout = roundTripTimeout * peer -> timeoutLimit;
|
||||
|
||||
if (outgoingCommand -> packet != NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user