Stop LLUDPServer sending updates after object deletes by always queueing deletes

If an LL 1.23.5 client (and possibly earlier and later) receives an object update after a kill object packet, it leaves the deleted prim in the scene until client relog
This is possible in LLUDPServer if an object update packet is queued but a kill packet sent immediately.
Beyond invasive tracking of kill sending, most expedient solution is to always queue kills, so that they always arrive after updates.
In tests, this doesn't appear to affect performance.
There is probably still an issue present where an update packet might not be acked and then resent after the kill packet.
This commit is contained in:
Justin Clark-Casey (justincc)
2010-12-02 01:55:49 +00:00
parent 26569a7cd0
commit 5246d98b8d
3 changed files with 28 additions and 19 deletions

View File

@@ -403,11 +403,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Queue an outgoing packet if appropriate.
/// </summary>
/// <param name="packet"></param>
/// <param name="forceQueue">Always queue the packet if at all possible.</param>
/// <returns>
/// true if the packet has been queued,
/// false if the packet has not been queued and should be sent immediately.
/// </returns>
public bool EnqueueOutgoing(OutgoingPacket packet)
public bool EnqueueOutgoing(OutgoingPacket packet, bool forceQueue)
{
int category = (int)packet.Category;
@@ -416,14 +417,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category];
TokenBucket bucket = m_throttleCategories[category];
if (bucket.RemoveTokens(packet.Buffer.DataLength))
if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength))
{
// Enough tokens were removed from the bucket, the packet will not be queued
return false;
}
else
{
// Not enough tokens in the bucket, queue this packet
// Force queue specified or not enough tokens in the bucket, queue this packet
queue.Enqueue(packet);
return true;
}