HBASE-24570 connection#close throws NPE

This commit is contained in:
Bo Cui 2020-07-18 10:26:00 +08:00 committed by stack
parent 96015e9669
commit 125544acfa
1 changed files with 3 additions and 1 deletions

View File

@ -2116,7 +2116,9 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
this.metrics.shutdown();
}
this.closed = true;
registry.close();
if (this.registry != null) {
registry.close();
}
this.stubs.clear();
if (clusterStatusListener != null) {
clusterStatusListener.close();