We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0552d2f commit d09da19Copy full SHA for d09da19
data-api/csharp-ws/CoinAPI.WebSocket.V1/CoinApiWsClient.cs
@@ -340,10 +340,19 @@ private async Task HandleConnection(CancellationTokenSource connectionCts)
340
}
341
catch (TaskCanceledException)
342
{
343
- if (_client.State == WebSocketState.Open)
+ try
344
+ {
345
+ if (_client.State == WebSocketState.Open)
346
347
+ await _client.CloseAsync(WebSocketCloseStatus.NormalClosure, "Normal", CancellationToken.None);
348
+
349
+ }
350
351
352
+ catch (Exception ex)
353
- await _client.CloseAsync(WebSocketCloseStatus.NormalClosure, "Normal", CancellationToken.None);
354
355
+ OnError(ex);
356
357
358
catch (Exception ex)
0 commit comments