Support .net 6 for tcp keep alive (#777)

This commit is contained in:
Zhiwei Liu
2022-02-08 08:13:24 +00:00
committed by GitHub
parent 8f4ee45cf3
commit d74f357c9f
2 changed files with 2 additions and 2 deletions

View File

@@ -176,7 +176,7 @@ namespace k8s
FirstMessageHandler = HttpClientHandler = CreateRootHandler();
#if NET5_0
#if NET5_0_OR_GREATER
// https://github.com/kubernetes-client/csharp/issues/587
// let user control if tcp keep alive until better fix
if (config.TcpKeepAlive)

View File

@@ -300,7 +300,7 @@ namespace k8s
}
else
{
#if NET5_0
#if NET5_0_OR_GREATER
var content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
#else
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);