You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-06 02:11:06 +09:00
Fixed issue with recycling count and resent messages
This commit is contained in:
@@ -187,10 +187,14 @@ namespace Lidgren.Network
|
||||
{
|
||||
if (m_outgoingMessagesPool == null)
|
||||
return;
|
||||
|
||||
NetException.Assert(msg.m_recyclingCount == 0, "Wrong recycling count! Should be zero; found " + msg.m_recyclingCount);
|
||||
|
||||
#if DEBUG
|
||||
NetException.Assert(m_outgoingMessagesPool.Contains(msg) == false, "Recyling already recycled message! Thread race?");
|
||||
if (msg.m_recyclingCount != 0)
|
||||
LogWarning("Wrong recycling count! should be zero; found " + msg.m_recyclingCount);
|
||||
#endif
|
||||
// setting m_recyclingCount to zero SHOULD be an unnecessary maneuver, if it's not zero something is wrong
|
||||
// however, in RELEASE, we'll just have to accept this and move on with life
|
||||
msg.m_recyclingCount = 0;
|
||||
|
||||
byte[] storage = msg.m_data;
|
||||
msg.m_data = null;
|
||||
|
||||
Reference in New Issue
Block a user