Fix: 修复客户端续约失败判断条件问题.

pull/10/head
chen.ma 3 years ago
parent c0eb2f002f
commit a369daa5a3

@ -1,5 +1,6 @@
package com.github.dynamic.threadpool.starter.core; package com.github.dynamic.threadpool.starter.core;
import cn.hutool.core.util.StrUtil;
import com.github.dynamic.threadpool.common.constant.Constants; import com.github.dynamic.threadpool.common.constant.Constants;
import com.github.dynamic.threadpool.common.model.InstanceInfo; import com.github.dynamic.threadpool.common.model.InstanceInfo;
import com.github.dynamic.threadpool.common.web.base.Result; import com.github.dynamic.threadpool.common.web.base.Result;
@ -103,7 +104,7 @@ public class DiscoveryClient {
renewResult = httpAgent.httpPostByDiscovery(Constants.BASE_PATH + "/apps/renew", instanceRenew); renewResult = httpAgent.httpPostByDiscovery(Constants.BASE_PATH + "/apps/renew", instanceRenew);
if (renewResult.getCode() == ErrorCodeEnum.NOT_FOUND.getCode()) { if (StrUtil.equals(ErrorCodeEnum.NOT_FOUND.getCode(), renewResult.getCode())) {
long timestamp = instanceInfo.setIsDirtyWithTime(); long timestamp = instanceInfo.setIsDirtyWithTime();
boolean success = register(); boolean success = register();
if (success) { if (success) {

Loading…
Cancel
Save