Fix npe in zone aware invoker (#9851)

This commit is contained in:
GuoHao 2022-03-29 13:59:18 +08:00 committed by GitHub
parent feb1792b63
commit 29becdc22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ public class ZoneAwareClusterInvoker<T> extends AbstractClusterInvoker<T> {
// load balance among all registries, with registry weight count in.
Invoker<T> balancedInvoker = select(loadbalance, invocation, invokers, null);
if (balancedInvoker.isAvailable()) {
if (balancedInvoker!=null && balancedInvoker.isAvailable()) {
return balancedInvoker.invoke(invocation);
}