this can't throw

This commit is contained in:
Matthias Mailänder
2014-06-16 16:34:44 +02:00
parent d25fd654bc
commit 4d2412f4b8
2 changed files with 3 additions and 13 deletions

View File

@@ -37,21 +37,11 @@ namespace OpenRA.Network
}
}
public static void TryStoppingNatDiscovery()
public static void StoppingNatDiscovery()
{
Log.Write("server", "Stopping NAT discovery.");
NatUtility.StopDiscovery();
try
{
NatUtility.StopDiscovery();
}
catch (Exception e)
{
Log.Write("server", "Failed to stop NAT device discovery: {0}", e);
Game.Settings.Server.NatDeviceAvailable = false;
Game.Settings.Server.AllowPortForward = false;
}
if (NatDevice == null)
{
Log.Write("server", "No NAT devices with UPnP enabled found within {0} ms deadline. Disabling automatic port forwarding.".F(Game.Settings.Server.NatDiscoveryTimeout));