enable websocket on netstandard (#899)
* enable websocket on netstandard * happy build
This commit is contained in:
@@ -210,6 +210,9 @@ namespace k8s
|
||||
cancellationToken);
|
||||
}
|
||||
|
||||
partial void BeforeRequest();
|
||||
partial void AfterRequest();
|
||||
|
||||
protected async Task<WebSocket> StreamConnectAsync(Uri uri, string webSocketSubProtocol = null, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (uri == null)
|
||||
@@ -280,6 +283,7 @@ namespace k8s
|
||||
WebSocket webSocket = null;
|
||||
try
|
||||
{
|
||||
BeforeRequest();
|
||||
webSocket = await webSocketBuilder.BuildAndConnectAsync(uri, CancellationToken.None)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
@@ -335,6 +339,10 @@ namespace k8s
|
||||
{
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
AfterRequest();
|
||||
}
|
||||
|
||||
return webSocket;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user