Network/ENetPeer: Improved stability of connections

http://lists.cubik.org/pipermail/enet-discuss/2014-May/002308.html
This commit is contained in:
Lynix 2017-01-28 12:14:41 +01:00
parent c9d5f2f1ac
commit 6ab6ec4f14
1 changed files with 3 additions and 1 deletions

View File

@ -336,7 +336,9 @@ namespace Nz
++m_packetsLost; ++m_packetsLost;
outgoingCommand->roundTripTimeout *= 2; // http://lists.cubik.org/pipermail/enet-discuss/2014-May/002308.html
outgoingCommand->roundTripTimeout = m_roundTripTime + 4 * m_roundTripTimeVariance;
outgoingCommand->roundTripTimeoutLimit = m_timeoutLimit * outgoingCommand->roundTripTimeout;
m_outgoingReliableCommands.emplace_front(std::move(*outgoingCommand)); m_outgoingReliableCommands.emplace_front(std::move(*outgoingCommand));
m_sentReliableCommands.erase(outgoingCommand); m_sentReliableCommands.erase(outgoingCommand);