From 7a557f97b3f582f73b014dcbceda9129eb62f936 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 23 Aug 2013 15:29:43 +0000 Subject: [PATCH] HBASE-9319 Apply 'HBASE-7685 Closing socket connection can't be removed from SecureClient' to trunk git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1516885 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/hadoop/hbase/ipc/RpcClient.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java index 886ad7b2eef..9dd56ed53dd 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java @@ -951,9 +951,7 @@ public class RpcClient { // release the resources // first thing to do;take the connection out of the connection list synchronized (connections) { - if (connections.get(remoteId) == this) { - connections.remove(remoteId); - } + connections.remove(remoteId, this); } // close the streams and therefore the socket @@ -1218,7 +1216,7 @@ public class RpcClient { super(msg); } } - + /** * Construct an IPC cluster client whose values are of the {@link Message} class. * @param conf configuration @@ -1274,7 +1272,7 @@ public class RpcClient { public RpcClient(Configuration conf, String clusterId) { this(conf, clusterId, NetUtils.getDefaultSocketFactory(conf), null); } - + /** * Construct an IPC client for the cluster clusterId with the default SocketFactory * @param conf configuration