From 9cb5db362123dda7d10ce2500926e2d3db9765f9 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 6 Oct 2009 15:08:09 -0700 Subject: [PATCH] Applying the real fix (thank you for tracking that MSDN doc down Melanie) --- .../ClientStack/LindenUDP/UnackedPacketCollection.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index 39882fb294..195ca57b9e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs @@ -111,12 +111,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP { lock (SyncRoot) { - OutgoingPacket p; - using (SortedDictionary.ValueCollection.Enumerator e = packets.Values.GetEnumerator()) - p = e.Current; - - return p; + { + if (e.MoveNext()) + return e.Current; + else + return null; + } } }