mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
check if a packet can be sent imediatly without accounting it as sent on throttles when it is enqueued for later send.
This commit is contained in:
@@ -588,9 +588,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength))
|
||||
if (!forceQueue && bucket.CheckTokens(packet.Buffer.DataLength))
|
||||
{
|
||||
// enough tokens so it can be sent imediatly by caller
|
||||
bucket.RemoveTokens(packet.Buffer.DataLength);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -605,6 +606,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
// We don't have a token bucket for this category, so it will not be queued
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user