1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-17 07:36:32 +09:00

newly introduced ReduceStoragePool bug fixed

This commit is contained in:
lidgren
2010-09-26 09:00:46 +00:00
parent c485a2d02c
commit 3b0c33fa8a

View File

@@ -190,7 +190,7 @@ namespace Lidgren.Network
reduceTo = m_maxStoredBytes / 2; reduceTo = m_maxStoredBytes / 2;
int remove = 0; int remove = 0;
while (m_storedBytes > reduceTo && m_storagePool.Count > 0) while (m_storedBytes > reduceTo && remove < m_storagePool.Count)
{ {
byte[] arr = m_storagePool[0]; byte[] arr = m_storagePool[0];
m_storedBytes -= arr.Length; m_storedBytes -= arr.Length;