Skip to content

Commit

Permalink
HBASE-27379 fix numOpenConnections metric is one less than the actual (
Browse files Browse the repository at this point in the history
…#4884)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
zhaomoran authored Nov 16, 2022
1 parent e5463e8 commit d7c4447
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,7 @@ public void setSocketSendBufSize(int size) {

@Override
public int getNumOpenConnections() {
int channelsCount = allChannels.size();
// allChannels also contains the server channel, so exclude that from the count.
return channelsCount > 0 ? channelsCount - 1 : channelsCount;
return allChannels.size();
}

private void initSSL(ChannelPipeline p, boolean supportPlaintext)
Expand Down

0 comments on commit d7c4447

Please sign in to comment.