Fix RCS1236
This commit is contained in:
@@ -1136,5 +1136,9 @@ dotnet_diagnostic.RCS1233.severity = warning
|
|||||||
# Optimize method call.
|
# Optimize method call.
|
||||||
dotnet_diagnostic.RCS1235.severity = warning
|
dotnet_diagnostic.RCS1235.severity = warning
|
||||||
|
|
||||||
|
# Use exception filter.
|
||||||
|
dotnet_diagnostic.RCS1236.severity = warning
|
||||||
|
|
||||||
# Use 'for' statement instead of 'while' statement.
|
# Use 'for' statement instead of 'while' statement.
|
||||||
dotnet_diagnostic.RCS1239.severity = warning
|
dotnet_diagnostic.RCS1239.severity = warning
|
||||||
|
|
||||||
|
|||||||
@@ -109,10 +109,8 @@ namespace OpenRA.FileSystem
|
|||||||
|
|
||||||
Mount(package, explicitName);
|
Mount(package, explicitName);
|
||||||
}
|
}
|
||||||
catch
|
catch when (optional)
|
||||||
{
|
{
|
||||||
if (!optional)
|
|
||||||
throw;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -248,12 +248,9 @@ namespace OpenRA.Server
|
|||||||
{
|
{
|
||||||
listener.Server.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, 1);
|
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}");
|
Log.Write("server", $"Failed to set socket option on {endpoint}: {ex.Message}");
|
||||||
else
|
|
||||||
throw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
listener.Start();
|
listener.Start();
|
||||||
|
|||||||
Reference in New Issue
Block a user