Skip to content

Commit

Permalink
Pass CancellationToken from StreamConnectAsync to webSocketBuilder.Bu…
Browse files Browse the repository at this point in the history
…ildAndConnectAsync (#1504)
  • Loading branch information
nathanwoctopusdeploy authored Jan 22, 2024
1 parent b27033a commit 465c1fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/KubernetesClient/Kubernetes.WebSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ protected async Task<WebSocket> StreamConnectAsync(Uri uri, string webSocketSubP
try
{
BeforeRequest();
webSocket = await webSocketBuilder.BuildAndConnectAsync(uri, CancellationToken.None)
.ConfigureAwait(false);
webSocket = await webSocketBuilder.BuildAndConnectAsync(uri, cancellationToken).ConfigureAwait(false);
}
catch (WebSocketException wse) when (wse.WebSocketErrorCode == WebSocketError.HeaderError ||
(wse.InnerException is WebSocketException &&
Expand Down

0 comments on commit 465c1fd

Please sign in to comment.