From 29c869fd3358066bec44a1f78b319a2f9169da0c Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 16 Jan 2008 06:04:33 +0000 Subject: * Fix for: http://opensimulator.org/mantis/view.php?id=358 --- OpenSim/Region/ClientStack/ClientView.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/ClientView.cs') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index c1f4126..e74aee7 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -2373,8 +2373,19 @@ namespace OpenSim.Region.ClientStack { foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets) { - m_unAckedBytes -= m_needAck[block.ID].ToBytes().Length; - m_needAck.Remove(block.ID); + if (m_needAck.ContainsKey(block.ID)) + { + try + { + m_unAckedBytes -= m_needAck[block.ID].ToBytes().Length; + m_needAck.Remove(block.ID); + } + catch (System.Collections.Generic.KeyNotFoundException) + { + // Did another packet come in with the ack already? + // apparently so! + } + } } } } -- cgit v1.1