1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-07-23 01:45:31 +00:00

Fixed trying to authenticate dedicated connection when no credentials are set

This commit is contained in:
JKorf 2024-07-14 20:59:22 +02:00
parent 28d5287bd4
commit 5e0733d7f4

View File

@ -834,7 +834,11 @@ namespace CryptoExchange.Net.Sockets
bool anyAuthenticated; bool anyAuthenticated;
lock (_listenersLock) lock (_listenersLock)
anyAuthenticated = _listeners.OfType<Subscription>().Any(s => s.Authenticated) || DedicatedRequestConnection; {
anyAuthenticated = _listeners.OfType<Subscription>().Any(s => s.Authenticated)
|| (DedicatedRequestConnection && ApiClient.AuthenticationProvider != null);
}
if (anyAuthenticated) if (anyAuthenticated)
{ {
// If we reconnected a authenticated connection we need to re-authenticate // If we reconnected a authenticated connection we need to re-authenticate