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
Recycling problems hopefully fully fixed now. Library message now also recycled.
This commit is contained in:
@@ -225,7 +225,7 @@ namespace Lidgren.Network
|
||||
return added;
|
||||
}
|
||||
|
||||
// send message immediately
|
||||
// send message immediately and recycle it
|
||||
internal void SendLibrary(NetOutgoingMessage msg, IPEndPoint recipient)
|
||||
{
|
||||
VerifyNetworkThread();
|
||||
@@ -234,6 +234,10 @@ namespace Lidgren.Network
|
||||
bool connReset;
|
||||
int len = msg.Encode(m_sendBuffer, 0, 0);
|
||||
SendPacket(len, recipient, 1, out connReset);
|
||||
|
||||
// no reliability, no multiple recipients - we can just recycle this message immediately
|
||||
msg.m_recyclingCount = 0;
|
||||
Recycle(msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user