add socket error callback trace

This commit is contained in:
zhongchao
2022-08-17 15:02:39 +08:00
parent 617b342910
commit db38a839c3
4 changed files with 38 additions and 4 deletions

View File

@@ -146,13 +146,16 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
}
val httpDnsSimpleLocation =
if (mogoLocation != null && mogoLocation.latitude != 0.0 && mogoLocation.longitude != 0.0) {
if(mogoLocation.cityCode.isNullOrEmpty() && !GDLocationClient.getInstance(context).lastCityCode.isNullOrEmpty()){
if (mogoLocation.cityCode.isNullOrEmpty() && !GDLocationClient.getInstance(
context
).lastCityCode.isNullOrEmpty()
) {
HttpDnsSimpleLocation(
GDLocationClient.getInstance(context).lastCityCode,
mogoLocation.latitude,
mogoLocation.longitude
)
}else{
} else {
HttpDnsSimpleLocation(
mogoLocation.cityCode,
mogoLocation.latitude,
@@ -252,7 +255,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
linkCode = CHAIN_LINK_CLOUD_SHOW,
endpoint = PAD,
nodeAliasCode = CHAIN_ALIAS_CODE_HTTP_DNS_CHANGED,
paramIndexes = [0,1],
paramIndexes = [0, 1],
clientPkFileName = "sn"
)
override fun onAddressChanged(cityCode: String, address: Map<String, String>?) {
@@ -333,6 +336,18 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
CallerLogger.d(SceneConstant.M_HMI + TAG, "socket-onConnectLost")
DebugConfig.setDownloadSnapshot(false)
}
@ChainLog(
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
linkCode = CHAIN_LINK_CLOUD_SHOW,
endpoint = PAD,
nodeAliasCode = CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST,
paramIndexes = [0, 1],
clientPkFileName = "sn"
)
override fun onError(code: String, msg: String?) {
CallerLogger.d(SceneConstant.M_HMI + TAG, "socket-onConnectLost")
}
})
// 开启Socket长链服务
val lat = location.latitude