You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-19 00:26:30 +09:00
Avoid throwing exception in SendToAll when no connections
This commit is contained in:
@@ -24,7 +24,11 @@ namespace Lidgren.Network
|
|||||||
/// <param name="method">How to deliver the message</param>
|
/// <param name="method">How to deliver the message</param>
|
||||||
public void SendToAll(NetOutgoingMessage msg, NetDeliveryMethod method)
|
public void SendToAll(NetOutgoingMessage msg, NetDeliveryMethod method)
|
||||||
{
|
{
|
||||||
SendMessage(msg, this.Connections, method, 0);
|
var all = this.Connections;
|
||||||
|
if (all.Count <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SendMessage(msg, all, method, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user