[3.1.0]reject the stop and restart of socket
This commit is contained in:
@@ -52,10 +52,11 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
|
||||
private var context: Context? = null
|
||||
|
||||
@Volatile
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user