Recover from an internal mess-up in the outgoing packet queues by creating
a new queue object.avinationmerge
parent
ccba04f345
commit
b459239833
|
@ -498,7 +498,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
{
|
||||
if (m_deliverPackets == false) return false;
|
||||
|
||||
OutgoingPacket packet;
|
||||
OutgoingPacket packet = null;
|
||||
OpenSim.Framework.LocklessQueue<OutgoingPacket> queue;
|
||||
TokenBucket bucket;
|
||||
bool packetSent = false;
|
||||
|
@ -530,7 +530,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// No dequeued packet waiting to be sent, try to pull one off
|
||||
// this queue
|
||||
queue = m_packetOutboxes[i];
|
||||
if (queue != null && queue.Dequeue(out packet))
|
||||
if (queue != null)
|
||||
{
|
||||
bool success = false;
|
||||
try
|
||||
{
|
||||
success = queue.Dequeue(out packet);
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_packetOutboxes[i] = new OpenSim.Framework.LocklessQueue<OutgoingPacket>();
|
||||
}
|
||||
if (success)
|
||||
{
|
||||
// A packet was pulled off the queue. See if we have
|
||||
// enough tokens in the bucket to send it out
|
||||
|
@ -559,6 +570,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
emptyCategories |= CategoryToFlag(i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_packetOutboxes[i] = new OpenSim.Framework.LocklessQueue<OutgoingPacket>();
|
||||
emptyCategories |= CategoryToFlag(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (emptyCategories != 0)
|
||||
|
|
Loading…
Reference in New Issue