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
Rev397-400 on google code; fixes to recycling and minor tweak to heartbeat calling when a disconnection occurs
This commit is contained in:
@@ -123,6 +123,8 @@ namespace Lidgren.Network
|
||||
if (m_outgoingMessagesPool == null || !m_outgoingMessagesPool.TryDequeue(out retval))
|
||||
retval = new NetOutgoingMessage();
|
||||
|
||||
NetException.Assert(retval.m_recyclingCount == 0, "Wrong recycling count! Should be zero");
|
||||
|
||||
if (initialCapacity > 0)
|
||||
retval.m_data = GetStorage(initialCapacity);
|
||||
|
||||
@@ -186,6 +188,8 @@ namespace Lidgren.Network
|
||||
if (m_outgoingMessagesPool == null)
|
||||
return;
|
||||
|
||||
NetException.Assert(msg.m_recyclingCount == 0, "Wrong recycling count! Should be zero");
|
||||
|
||||
NetException.Assert(m_outgoingMessagesPool.Contains(msg) == false, "Recyling already recycled message! Thread race?");
|
||||
|
||||
byte[] storage = msg.m_data;
|
||||
|
||||
Reference in New Issue
Block a user