added extra check if it is a liveNode

This commit is contained in:
Noble Paul 2017-05-04 15:13:01 +09:30
parent 3a7aedcef9
commit e912b7cb5c
1 changed files with 1 additions and 0 deletions

View File

@ -193,6 +193,7 @@ public class PKIAuthenticationPlugin extends AuthenticationPlugin implements Htt
}
PublicKey getRemotePublicKey(String nodename) {
if (!cores.getZkController().getZkStateReader().getClusterState().getLiveNodes().contains(nodename)) return null;
String url = cores.getZkController().getZkStateReader().getBaseUrlForNodeName(nodename);
try {
String uri = url + PATH + "?wt=json&omitHeader=true";