mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* Converts ClientManager.ForEach() (and as a result, Scene.ForEachClient()) to use a non-blocking parallel method when operating in async mode
* Minor code readability cleanup
This commit is contained in:
@@ -2105,12 +2105,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
|
||||
{
|
||||
ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect);
|
||||
packet.Effect = effectBlocks;
|
||||
packet.Header.Reliable = false;
|
||||
packet.Header.Zerocoded = true;
|
||||
|
||||
packet.AgentData.AgentID = AgentId;
|
||||
packet.AgentData.SessionID = SessionId;
|
||||
packet.Header.Reliable = false;
|
||||
packet.Header.Zerocoded = true;
|
||||
|
||||
packet.Effect = effectBlocks;
|
||||
|
||||
OutPacket(packet, ThrottleOutPacketType.State);
|
||||
}
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category];
|
||||
TokenBucket bucket = m_throttleCategories[category];
|
||||
|
||||
if (m_throttleCategories[category].RemoveTokens(packet.Buffer.DataLength))
|
||||
if (bucket.RemoveTokens(packet.Buffer.DataLength))
|
||||
{
|
||||
// Enough tokens were removed from the bucket, the packet will not be queued
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user