From 687b27b13f4a3c302806d065ef02ad078941f185 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Tue, 18 Apr 2023 16:21:10 +0800 Subject: [PATCH] [2.15.0] reject the socket reconnect when loc change --- .../mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt b/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt index 584308b320..3de77349bc 100644 --- a/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt +++ b/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt @@ -55,7 +55,7 @@ class HttpDnsStartUp : AndroidStartup() { private var gotToken = false private var httpDnsSimpleLocation by Delegates.observable(getDefaultSimpleLocation()) { _, oldValue, newValue -> - if (oldValue.cityCode != newValue.cityCode) { + if (gotToken && oldValue.cityCode != newValue.cityCode) { reConnectSocket(oldValue.cityCode, newValue.cityCode) } }