Skip to content

Commit

Permalink
Update SDK (#4162)
Browse files Browse the repository at this point in the history
* Update global.json

As per dotnet/aspnetcore#49297

* Update Directory.Build.targets

Suppress TBD

* Fix build
  • Loading branch information
RussKie authored Jul 11, 2023
1 parent 142fe18 commit b7bc228
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<!-- This is false for local development, but set to true in the CI system -->
<TreatWarningsAsErrors Condition=" '$(TreatWarningsAsErrors)' == '' ">false</TreatWarningsAsErrors>

<!-- TODO: remove once https://github.com/dotnet/extensions/issues/4161 is resolved -->
<NoWarn>$(NoWarn);TBD</NoWarn>

<!--
TODO: to be resolved (https://github.com/dotnet/extensions/issues/4128)
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "8.0.100-preview.7.23328.2"
"version": "8.0.100-preview.7.23360.1"
},
"tools": {
"dotnet": "8.0.100-preview.7.23328.2",
"dotnet": "8.0.100-preview.7.23360.1",
"runtimes": {
"dotnet/x64": [
"3.1.32",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ internal sealed class TcpEndpointHealthCheckService : BackgroundService
private readonly ILogger<TcpEndpointHealthCheckService> _logger;
private readonly HealthCheckService _healthCheckService;
private readonly KubernetesProbesOptions.EndpointOptions _options;
#pragma warning disable CA2213 // 'TcpEndpointHealthCheckService' contains field '_listener' that is of IDisposable type 'TcpListener'
private readonly TcpListener _listener;
#pragma warning restore CA2213

public TcpEndpointHealthCheckService(ILogger<TcpEndpointHealthCheckService> logger, HealthCheckService healthCheckService, KubernetesProbesOptions.EndpointOptions options)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ private static bool IsTcpOpened(int port)

private static int GetFreeTcpPort()
{
#pragma warning disable CA2000 // Dispose objects before losing scope
var listener = new TcpListener(IPAddress.Loopback, 0);
#pragma warning restore CA2000 // Dispose objects before losing scope
listener.Start();
int port = ((IPEndPoint)listener.LocalEndpoint).Port;
listener.Stop();
Expand Down

0 comments on commit b7bc228

Please sign in to comment.