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
|
// Stats tracking
|
||||||
Interlocked.Increment(ref udpClient.PacketsSent);
|
Interlocked.Increment(ref udpClient.PacketsSent);
|
||||||
if (isReliable)
|
|
||||||
Interlocked.Add(ref udpClient.UnackedBytes, outgoingPacket.Buffer.DataLength);
|
|
||||||
|
|
||||||
// Put the UDP payload on the wire
|
// Put the UDP payload on the wire
|
||||||
AsyncBeginSend(buffer);
|
AsyncBeginSend(buffer);
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Threading;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
@ -77,6 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public void Add(OutgoingPacket packet)
|
public void Add(OutgoingPacket packet)
|
||||||
{
|
{
|
||||||
m_pendingAdds.Enqueue(packet);
|
m_pendingAdds.Enqueue(packet);
|
||||||
|
Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -166,7 +168,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_packets.Remove(pendingRemove.SequenceNumber);
|
m_packets.Remove(pendingRemove.SequenceNumber);
|
||||||
|
|
||||||
// Update stats
|
// 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)
|
if (!pendingRemove.FromResend)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue