Fix UnackedBytes client stack statistic as seen in "show queues"
Bytes were being wrongly added again on a resendviewer-2-initial-appearance
parent
37837850d3
commit
81552099d6
|
@ -585,8 +585,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
// Stats tracking
|
||||
Interlocked.Increment(ref udpClient.PacketsSent);
|
||||
if (isReliable)
|
||||
Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength);
|
||||
|
||||
// Put the UDP payload on the wire
|
||||
AsyncBeginSend(buffer);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
@ -77,6 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
public void Add(OutgoingPacket packet)
|
||||
{
|
||||
m_pendingAdds.Enqueue(packet);
|
||||
Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -166,7 +168,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
m_packets.Remove(pendingRemove.SequenceNumber);
|
||||
|
||||
// Update stats
|
||||
System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
|
||||
Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
|
||||
|
||||
if (!pendingRemove.FromResend)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue