Fix cluster node state error (#10011)

* Fix cluster node state error

* Fix checkstyle
This commit is contained in:
chenyiqin 2023-03-01 09:40:30 +08:00 committed by GitHub
parent aebe583049
commit 5a8f6f5f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,8 @@ import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentSkipListMap;
import static com.alibaba.nacos.api.exception.NacosException.CLIENT_INVALID_PARAM;
/**
* Cluster node management in Nacos.
*
@ -583,6 +585,8 @@ public class ServerMemberManager implements ApplicationListener<WebServerInitial
clusterRpcClientProxy = ApplicationUtils.getBean(ClusterRpcClientProxy.class);
}
if (!clusterRpcClientProxy.isRunning(target)) {
MemberUtil.onFail(ServerMemberManager.this, target,
new NacosException(CLIENT_INVALID_PARAM, "No rpc client related to member: " + target));
return;
}