mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-07-23 18:05:43 +00:00
Fixed potential collection modified exception
This commit is contained in:
parent
a02b3f88d7
commit
1d4353e6d1
@ -629,7 +629,11 @@ namespace CryptoExchange.Net.Sockets
|
|||||||
return new CallResult<bool>(true);
|
return new CallResult<bool>(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_subscriptions.Any(s => s.Authenticated))
|
bool anyAuthenticated = false;
|
||||||
|
lock (_subscriptionLock)
|
||||||
|
anyAuthenticated = _subscriptions.Any(s => s.Authenticated);
|
||||||
|
|
||||||
|
if (anyAuthenticated)
|
||||||
{
|
{
|
||||||
// If we reconnected a authenticated connection we need to re-authenticate
|
// If we reconnected a authenticated connection we need to re-authenticate
|
||||||
var authResult = await ApiClient.AuthenticateSocketAsync(this).ConfigureAwait(false);
|
var authResult = await ApiClient.AuthenticateSocketAsync(this).ConfigureAwait(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user