You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-17 15:46:33 +09:00
Fix Now messages sent from a server without clients are recycled
This commit is contained in:
@@ -25,8 +25,11 @@ namespace Lidgren.Network
|
|||||||
public void SendToAll(NetOutgoingMessage msg, NetDeliveryMethod method)
|
public void SendToAll(NetOutgoingMessage msg, NetDeliveryMethod method)
|
||||||
{
|
{
|
||||||
var all = this.Connections;
|
var all = this.Connections;
|
||||||
if (all.Count <= 0)
|
if (all.Count <= 0) {
|
||||||
|
if (msg.m_isSent == false)
|
||||||
|
Recycle(msg);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SendMessage(msg, all, method, 0);
|
SendMessage(msg, all, method, 0);
|
||||||
}
|
}
|
||||||
@@ -41,8 +44,11 @@ namespace Lidgren.Network
|
|||||||
public void SendToAll(NetOutgoingMessage msg, NetConnection except, NetDeliveryMethod method, int sequenceChannel)
|
public void SendToAll(NetOutgoingMessage msg, NetConnection except, NetDeliveryMethod method, int sequenceChannel)
|
||||||
{
|
{
|
||||||
var all = this.Connections;
|
var all = this.Connections;
|
||||||
if (all.Count <= 0)
|
if (all.Count <= 0) {
|
||||||
|
if (msg.m_isSent == false)
|
||||||
|
Recycle(msg);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (except == null)
|
if (except == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user