1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 07:56:12 +00:00

Removed websocket Error callback when exception is expected

This commit is contained in:
Jkorf 2025-01-09 16:23:34 +01:00
parent 7904aa9ba7
commit 9b7019ded2

View File

@ -604,8 +604,10 @@ namespace CryptoExchange.Net.Sockets
} }
catch (Exception wse) catch (Exception wse)
{ {
// Connection closed unexpectedly if (!_ctsSource.Token.IsCancellationRequested)
await (OnError?.Invoke(wse) ?? Task.CompletedTask).ConfigureAwait(false); // Connection closed unexpectedly
await (OnError?.Invoke(wse) ?? Task.CompletedTask).ConfigureAwait(false);
if (_closeTask?.IsCompleted != false) if (_closeTask?.IsCompleted != false)
_closeTask = CloseInternalAsync(); _closeTask = CloseInternalAsync();
break; break;