aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-12-02 01:55:49 +0000
committerJustin Clark-Casey (justincc)2010-12-02 02:01:01 +0000
commit5246d98b8df3cc613a199851c3ac33ec753f522a (patch)
treed4ce71333504fef05419ba27cbfbeabcaad0f4c1 /OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
parentminor: add some method doc (diff)
downloadopensim-SC_OLD-5246d98b8df3cc613a199851c3ac33ec753f522a.zip
opensim-SC_OLD-5246d98b8df3cc613a199851c3ac33ec753f522a.tar.gz
opensim-SC_OLD-5246d98b8df3cc613a199851c3ac33ec753f522a.tar.bz2
opensim-SC_OLD-5246d98b8df3cc613a199851c3ac33ec753f522a.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 5bf36e6..e02783a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -403,11 +403,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
403 /// Queue an outgoing packet if appropriate. 403 /// Queue an outgoing packet if appropriate.
404 /// </summary> 404 /// </summary>
405 /// <param name="packet"></param> 405 /// <param name="packet"></param>
406 /// <param name="forceQueue">Always queue the packet if at all possible.</param>
406 /// <returns> 407 /// <returns>
407 /// true if the packet has been queued, 408 /// true if the packet has been queued,
408 /// false if the packet has not been queued and should be sent immediately. 409 /// false if the packet has not been queued and should be sent immediately.
409 /// </returns> 410 /// </returns>
410 public bool EnqueueOutgoing(OutgoingPacket packet) 411 public bool EnqueueOutgoing(OutgoingPacket packet, bool forceQueue)
411 { 412 {
412 int category = (int)packet.Category; 413 int category = (int)packet.Category;
413 414
@@ -416,14 +417,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
416 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category]; 417 OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category];
417 TokenBucket bucket = m_throttleCategories[category]; 418 TokenBucket bucket = m_throttleCategories[category];
418 419
419 if (bucket.RemoveTokens(packet.Buffer.DataLength)) 420 if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength))
420 { 421 {
421 // Enough tokens were removed from the bucket, the packet will not be queued 422 // Enough tokens were removed from the bucket, the packet will not be queued
422 return false; 423 return false;
423 } 424 }
424 else 425 else
425 { 426 {
426 // Not enough tokens in the bucket, queue this packet 427 // Force queue specified or not enough tokens in the bucket, queue this packet
427 queue.Enqueue(packet); 428 queue.Enqueue(packet);
428 return true; 429 return true;
429 } 430 }