lidgren / lidgren-network-gen3

Lidgren Network Library
https://groups.google.com/forum/#!forum/lidgren-network-gen3
MIT License
1.19k stars 331 forks source link

Windows in airplane mode gives an error. #40

Open Victov opened 9 years ago

Victov commented 9 years ago

Putting windows 10 in airplane mode (or having wifi disabled) generates a null reference exception. Lidgren tries to aquire an ip address but in airplane mode there is no ip address available.

I came by this when using Lidgren in Unity3D.

(partial) stack trace below.

NullReferenceException: Object reference not set to an instance of an object Lidgren.Network.NetUtility.GetBroadcastAddress () (at Assets/Scripts/External/Lindgren/Platform/PlatformWin32.cs:86) Lidgren.Network.NetPeerConfiguration..ctor (System.String appIdentifier) (at Assets/Scripts/External/Lindgren/NetPeerConfiguration.cs:98)

AgentFire commented 9 years ago

@Victov fix the error, create a pull request :]

AgentFire commented 8 years ago

@Victov may be I will try to fix it myself as I run into the same issue.