You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-17 23:56:30 +09:00
Fix sending broadcast packets
The `==` operator for IPAddress compares references not values, so `target.Address` will always not equal `ba`. Switching to `IPAddress.Equals` fixes this and allows broadcast packets to be sent on Linux.
This commit is contained in:
@@ -141,7 +141,7 @@ namespace Lidgren.Network
|
|||||||
ba = NetUtility.GetCachedBroadcastAddress();
|
ba = NetUtility.GetCachedBroadcastAddress();
|
||||||
|
|
||||||
// TODO: refactor this check outta here
|
// TODO: refactor this check outta here
|
||||||
if (target.Address == ba)
|
if (target.Address.Equals(ba))
|
||||||
{
|
{
|
||||||
// Some networks do not allow
|
// Some networks do not allow
|
||||||
// a global broadcast so we use the BroadcastAddress from the configuration
|
// a global broadcast so we use the BroadcastAddress from the configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user