You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-15 06:36:30 +09:00
Fix for possible race condition resulting in duplicate message recycling
Fix for DoS vulnerability with incoming acks
This commit is contained in:
@@ -138,8 +138,7 @@ namespace Lidgren.Network
|
||||
if (storedMessage != null)
|
||||
{
|
||||
#endif
|
||||
Interlocked.Decrement(ref storedMessage.m_recyclingCount);
|
||||
if (storedMessage.m_recyclingCount <= 0)
|
||||
if (Interlocked.Decrement(ref storedMessage.m_recyclingCount) <= 0)
|
||||
m_connection.m_peer.Recycle(storedMessage);
|
||||
|
||||
#if !DEBUG
|
||||
|
||||
Reference in New Issue
Block a user