mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-11 16:32:57 +00:00
Fix for unnecessary error message in logging when closing connection
This commit is contained in:
@@ -604,7 +604,7 @@ namespace CryptoExchange.Net.Sockets
|
||||
}
|
||||
catch (Exception wse)
|
||||
{
|
||||
if (!_ctsSource.Token.IsCancellationRequested)
|
||||
if (!_ctsSource.Token.IsCancellationRequested && !_stopRequested)
|
||||
// Connection closed unexpectedly
|
||||
await (OnError?.Invoke(wse) ?? Task.CompletedTask).ConfigureAwait(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user