HBASE-14431 Addendum checks for null connectionInPool (Yu Li)

This commit is contained in:
tedyu 2015-09-21 07:23:47 -07:00
parent 81d04cde27
commit ca6c7f0a68
1 changed files with 1 additions and 1 deletions

View File

@ -403,7 +403,7 @@ public class AsyncRpcClient extends AbstractRpcClient {
// we use address as cache key, so we should check here to prevent removing the
// wrong connection
AsyncRpcChannel connectionInPool = this.connections.get(connectionHashCode);
if (connectionInPool.equals(connection)) {
if (connectionInPool != null && connectionInPool.equals(connection)) {
this.connections.remove(connectionHashCode);
} else if (LOG.isDebugEnabled()) {
LOG.debug(String.format("%s already removed, expected instance %08x, actual %08x",