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>
(cherry picked from commit d7c4447)
  • Loading branch information
zhaomoran authored and Apache9 committed Nov 16, 2022
1 parent 2d038ed commit 71f746a
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,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();
}

@Override
Expand Down

0 comments on commit 71f746a

Please sign in to comment.