From 3b0c33fa8ad15efe45f248bd93e5ffc1a4b84f8f Mon Sep 17 00:00:00 2001 From: lidgren Date: Sun, 26 Sep 2010 09:00:46 +0000 Subject: [PATCH] newly introduced ReduceStoragePool bug fixed --- Lidgren.Network/NetPeer.Recycling.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lidgren.Network/NetPeer.Recycling.cs b/Lidgren.Network/NetPeer.Recycling.cs index bd2a7db..5198812 100644 --- a/Lidgren.Network/NetPeer.Recycling.cs +++ b/Lidgren.Network/NetPeer.Recycling.cs @@ -190,7 +190,7 @@ namespace Lidgren.Network reduceTo = m_maxStoredBytes / 2; int remove = 0; - while (m_storedBytes > reduceTo && m_storagePool.Count > 0) + while (m_storedBytes > reduceTo && remove < m_storagePool.Count) { byte[] arr = m_storagePool[0]; m_storedBytes -= arr.Length;