aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDr Scofield2009-06-25 07:59:47 +0000
committerDr Scofield2009-06-25 07:59:47 +0000
commite8e0ce5fc6bf26021a2ec03fc03cb33a4581a52a (patch)
treecc3cfbac31313848d1b5001c22ba0e717be83a76 /OpenSim
parentcommenting out rather expensive bits of GetClientInfo() --- the only (diff)
downloadopensim-SC_OLD-e8e0ce5fc6bf26021a2ec03fc03cb33a4581a52a.zip
opensim-SC_OLD-e8e0ce5fc6bf26021a2ec03fc03cb33a4581a52a.tar.gz
opensim-SC_OLD-e8e0ce5fc6bf26021a2ec03fc03cb33a4581a52a.tar.bz2
opensim-SC_OLD-e8e0ce5fc6bf26021a2ec03fc03cb33a4581a52a.tar.xz
changing DropSend()'s foreach loop so that it does not copy the
LLQueItem m_NeedAck queue each time.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index a1a8e00..7e3d919 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -741,16 +741,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
741 741
742 private void DropResend(Object id) 742 private void DropResend(Object id)
743 { 743 {
744 foreach (LLQueItem data in new List<LLQueItem>(m_NeedAck.Values)) 744 LLQueItem d = null;
745
746 foreach (LLQueItem data in m_NeedAck.Values)
745 { 747 {
746 if (data.Identifier != null && data.Identifier == id) 748 if (data.Identifier != null && data.Identifier == id)
747 { 749 {
748 m_NeedAck.Remove(data.Packet.Header.Sequence); 750 d = data;
749 m_PacketQueue.Cancel(data.Sequence); 751 break;
750 PacketPool.Instance.ReturnPacket(data.Packet);
751 return;
752 } 752 }
753 } 753 }
754
755 if (null == d) return;
756
757 m_NeedAck.Remove(d.Packet.Header.Sequence);
758 m_PacketQueue.Cancel(d.Sequence);
759 PacketPool.Instance.ReturnPacket(d.Packet);
754 } 760 }
755 761
756 private void TriggerOnPacketDrop(Packet packet, Object id) 762 private void TriggerOnPacketDrop(Packet packet, Object id)