Version 17.0 + Generate 1.33 (#1626)
* generated based on 1.33 * Update version to 17.0 in version.json * Remove extra API endpoint from swagger.json * Remove ModelConverter and related AutoMapper components * Update package versions * Refactor code to use ConfigureAwait(false) for asynchronous calls and update target framework to net9.0 * Remove ConfigureAwait(false) from OidcAuthTests for consistency in async calls * Update SDK version in README to reflect support for net8.0 and net9.0 * Update dotnet SDK version to 9.0.x in build workflow * Revert Fractions package version to 7.3.0 in Directory.Packages.props * Update target framework to netstandard2.1 for improved compatibility * Update package references for Microsoft.CodeAnalysis in Directory.Packages.props and LibKubernetesGenerator.target * Refactor Worker class constructor documentation and standardize Dictionary type declaration in Program.cs
This commit is contained in:
@@ -18,13 +18,13 @@ namespace portforward
|
||||
|
||||
var list = client.CoreV1.ListNamespacedPod("default");
|
||||
var pod = list.Items[0];
|
||||
await Forward(client, pod);
|
||||
await Forward(client, pod).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private static async Task Forward(IKubernetes client, V1Pod pod)
|
||||
{
|
||||
// Note this is single-threaded, it won't handle concurrent requests well...
|
||||
var webSocket = await client.WebSocketNamespacedPodPortForwardAsync(pod.Metadata.Name, "default", new int[] { 80 }, "v4.channel.k8s.io");
|
||||
var webSocket = await client.WebSocketNamespacedPodPortForwardAsync(pod.Metadata.Name, "default", new int[] { 80 }, "v4.channel.k8s.io").ConfigureAwait(false);
|
||||
var demux = new StreamDemuxer(webSocket, StreamType.PortForward);
|
||||
demux.Start();
|
||||
|
||||
@@ -67,12 +67,13 @@ namespace portforward
|
||||
}
|
||||
});
|
||||
|
||||
await accept;
|
||||
await copy;
|
||||
await accept.ConfigureAwait(false);
|
||||
await copy.ConfigureAwait(false);
|
||||
if (handler != null)
|
||||
{
|
||||
handler.Close();
|
||||
}
|
||||
|
||||
listener.Close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user