[2.15.0] reject the socket reconnect when loc change

This commit is contained in:
zhongchao
2023-04-18 16:21:10 +08:00
parent b23edd10b8
commit 687b27b13f

View File

@@ -55,7 +55,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
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)
}
}