diff --git a/Lidgren.Network/NetPeerStatistics.cs b/Lidgren.Network/NetPeerStatistics.cs index 841bf0f..093bd5c 100644 --- a/Lidgren.Network/NetPeerStatistics.cs +++ b/Lidgren.Network/NetPeerStatistics.cs @@ -105,7 +105,14 @@ namespace Lidgren.Network /// /// Gets the number of bytes in the recycled pool /// - public int BytesInRecyclePool { get { return m_peer.m_storagePoolBytes; } } + public int BytesInRecyclePool + { + get + { + lock (m_peer.m_storagePool) + return m_peer.m_storagePoolBytes; + } + } #if !USE_RELEASE_STATISTICS [Conditional("DEBUG")]