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

UPnP discovery timeout #28

Closed MichaelDePiazzi closed 9 years ago

MichaelDePiazzi commented 9 years ago

The UPnP discovery process was not timing out if a discovery response was not received (e.g. if UPnP was disabled on your router). So the status would remain on "Discovering" forever and never change to "NotAvailable".

This pull request resolves this issue. Let me know if you have any questions or need anything else.

PS. I would have used the new C# 6 null-conditional operator (e.g. m_upnp?.CheckForDiscoveryTimeout()), but I wasn't sure if you were using Visual Studio 2015 yet.