Description
Describe the bug
A clear and concise description of what the bug is.
k8s.Kubernetes.StreamConnectAsync
does not pass the CancellationToken to WebSocketBuilder.BuildAndConnectAsync
so there is no way to cancel an in-progress connection attempt
Kubernetes C# SDK Client Version
master
Server Kubernetes Version
n/a
Dotnet Runtime Version
net6.0
To Reproduce
Steps to reproduce the behavior:
- Use a method such as
Kubernetes.WebSocketNamespacedPodExecAsync
that callsKubernetes.StreamConnectAsync
with a CancellationToken - When
await webSocketBuilder.BuildAndConnectAsync
is executing cancel the CancellationToken - The connection attempt is not cancelled but continues to execute
Expected behavior
A clear and concise description of what you expected to happen.
- When the CancellationToken is cancelled, the connection attempt should also be cancelled
KubeConfig
n/a
Where do you run your app with Kubernetes SDK (please complete the following information):
n/a
Additional context
If the call to WebSocketBuilder.BuildAndConnectAsync
hangs while trying to establish the connection, there is currently no way to gracefully cancel this using the passed in CancellationToken and it can hang indefinitely