Fix RCS1236

This commit is contained in:
RoosterDragon
2023-08-11 19:47:48 +01:00
committed by Gustas
parent 498c6e3d8b
commit 9a3c39878d
3 changed files with 7 additions and 8 deletions

View File

@@ -248,12 +248,9 @@ namespace OpenRA.Server
{
listener.Server.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, 1);
}
catch (Exception ex)
catch (Exception ex) when (ex is SocketException || ex is ArgumentException)
{
if (ex is SocketException || ex is ArgumentException)
Log.Write("server", $"Failed to set socket option on {endpoint}: {ex.Message}");
else
throw;
Log.Write("server", $"Failed to set socket option on {endpoint}: {ex.Message}");
}
listener.Start();