Addresses Mantis #1810
Collapses two locks into one to avoid a situation were a List is cloned under two different locks, resulting in a bad index in .NET code.0.6.0-stable
parent
635b715880
commit
cc5d49d9c1
|
@ -234,6 +234,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
DropResend(id);
|
DropResend(id);
|
||||||
|
|
||||||
|
AddAcks(ref packet);
|
||||||
QueuePacket(packet, throttlePacketType, id);
|
QueuePacket(packet, throttlePacketType, id);
|
||||||
|
|
||||||
// We want to see that packet arrive if it's reliable
|
// We want to see that packet arrive if it's reliable
|
||||||
|
@ -245,9 +246,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void QueuePacket(
|
private void AddAcks(ref Packet packet)
|
||||||
Packet packet, ThrottleOutPacketType throttlePacketType,
|
|
||||||
Object id)
|
|
||||||
{
|
{
|
||||||
// Add acks to outgoing packets
|
// Add acks to outgoing packets
|
||||||
//
|
//
|
||||||
|
@ -269,7 +268,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void QueuePacket(
|
||||||
|
Packet packet, ThrottleOutPacketType throttlePacketType,
|
||||||
|
Object id)
|
||||||
|
{
|
||||||
packet.TickCount = System.Environment.TickCount;
|
packet.TickCount = System.Environment.TickCount;
|
||||||
|
|
||||||
LLQueItem item = new LLQueItem();
|
LLQueItem item = new LLQueItem();
|
||||||
|
@ -352,7 +356,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//
|
//
|
||||||
private void SendAcks()
|
private void SendAcks()
|
||||||
{
|
{
|
||||||
lock (m_PendingAcks)
|
lock (m_NeedAck)
|
||||||
{
|
{
|
||||||
if (m_PendingAcks.Count == 0)
|
if (m_PendingAcks.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -387,7 +391,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//
|
//
|
||||||
private void AckPacket(Packet packet)
|
private void AckPacket(Packet packet)
|
||||||
{
|
{
|
||||||
lock (m_PendingAcks)
|
lock (m_NeedAck)
|
||||||
{
|
{
|
||||||
if (m_PendingAcks.Count < 250)
|
if (m_PendingAcks.Count < 250)
|
||||||
{
|
{
|
||||||
|
@ -400,7 +404,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
SendAcks();
|
SendAcks();
|
||||||
|
|
||||||
lock (m_PendingAcks)
|
lock (m_NeedAck)
|
||||||
{
|
{
|
||||||
// If this is still full we have a truly exceptional
|
// If this is still full we have a truly exceptional
|
||||||
// condition (means, can't happen)
|
// condition (means, can't happen)
|
||||||
|
|
Loading…
Reference in New Issue