let minimum wqburst be a bit larger than MTU

avinationmerge
UbitUmarov 2015-09-22 18:56:03 +01:00
parent a8dc07ff5c
commit ae70f61a64
2 changed files with 4 additions and 4 deletions

View File

@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public int GetPacketsQueuedCount(ThrottleOutPacketType throttleType) public int GetPacketsQueuedCount(ThrottleOutPacketType throttleType)
{ {
int icat = (int)throttleType; int icat = (int)throttleType;
if (icat > 0 && icat < THROTTLE_CATEGORY_COUNT) if ((int)throttleType > 0 && icat < THROTTLE_CATEGORY_COUNT)
return m_packetOutboxes[icat].Count; return m_packetOutboxes[icat].Count;
else else
return 0; return 0;
@ -437,7 +437,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Make sure none of the throttles are set below our packet MTU, // Make sure none of the throttles are set below our packet MTU,
// otherwise a throttle could become permanently clogged // otherwise a throttle could become permanently clogged
/* not using floats /* now using floats
resend = Math.Max(resend, LLUDPServer.MTU); resend = Math.Max(resend, LLUDPServer.MTU);
land = Math.Max(land, LLUDPServer.MTU); land = Math.Max(land, LLUDPServer.MTU);
wind = Math.Max(wind, LLUDPServer.MTU); wind = Math.Max(wind, LLUDPServer.MTU);

View File

@ -104,8 +104,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
get { return m_burst; } get { return m_burst; }
set { set {
float rate = (value < 0 ? 0 : value); float rate = (value < 0 ? 0 : value);
if (rate < m_minimumDripRate) if (rate < 1.5f * m_minimumDripRate)
rate = m_minimumDripRate; rate = 1.5f * m_minimumDripRate;
else if (rate > m_minimumDripRate * m_quantumsPerBurst) else if (rate > m_minimumDripRate * m_quantumsPerBurst)
rate = m_minimumDripRate * m_quantumsPerBurst; rate = m_minimumDripRate * m_quantumsPerBurst;