1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

throttling bug fixed

This commit is contained in:
lidgren
2010-08-19 08:05:25 +00:00
parent 482c721a93
commit d4c4f7610c

View File

@@ -204,8 +204,14 @@ namespace Lidgren.Network
double frameLength = now - m_lastSentUnsentMessages;
if (m_throttleDebt > 0)
m_throttleDebt -= (float)(frameLength * throttle);
m_lastSentUnsentMessages = now;
}
else
{
// 0 = unlimited (but still respect throttlethreshold per iteration)
m_throttleDebt = 0;
}
m_lastSentUnsentMessages = now;
int mtu = m_peerConfiguration.m_maximumTransmissionUnit;
bool useCoalescing = m_peerConfiguration.m_useMessageCoalescing;