check if we really found a UPnP compatible NAT device

This commit is contained in:
Matthias Mailänder
2014-06-16 16:35:33 +02:00
parent 4d2412f4b8
commit a8c029f130

View File

@@ -42,7 +42,7 @@ namespace OpenRA.Network
Log.Write("server", "Stopping NAT discovery.");
NatUtility.StopDiscovery();
if (NatDevice == null)
if (NatDevice == null || NatDevice.GetType() != typeof(Mono.Nat.Upnp.UpnpNatDevice))
{
Log.Write("server", "No NAT devices with UPnP enabled found within {0} ms deadline. Disabling automatic port forwarding.".F(Game.Settings.Server.NatDiscoveryTimeout));
Game.Settings.Server.NatDeviceAvailable = false;