You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 07:06:30 +09:00
Fix data race in NetPeerStatistics.BytesInRecyclePool
This commit is contained in:
@@ -105,7 +105,14 @@ namespace Lidgren.Network
|
||||
/// <summary>
|
||||
/// Gets the number of bytes in the recycled pool
|
||||
/// </summary>
|
||||
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")]
|
||||
|
||||
Reference in New Issue
Block a user