diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/ConnectionsSupervisor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/ConnectionsSupervisor.kt index 430e78fef..113b6e7ce 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/ConnectionsSupervisor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/ConnectionsSupervisor.kt @@ -102,7 +102,6 @@ internal class ConnectionsSupervisor( indexerConfig = null validatorConnected = false socketConnected = false - validatorUrl = null disconnectSocket() } } @@ -175,14 +174,8 @@ internal class ConnectionsSupervisor( } private fun bestEffortConnectChain() { - if (validatorUrl == null) { - val endpointUrls = helper.configs.validatorUrls() - validatorUrl = endpointUrls?.firstOrNull() - } findOptimalNode { url -> - if (url != this.validatorUrl) { - this.validatorUrl = url - } + this.validatorUrl = url } } @@ -391,7 +384,6 @@ internal class ConnectionsSupervisor( val timer = helper.ioImplementations.timer ?: CoroutineTimer.instance chainTimer = timer.schedule(serverPollingDuration, null) { if (readyToConnect) { - validatorUrl = null bestEffortConnectChain() } false