HBASE-27379 fix numOpenConnections metric is one less than the actual (#4884)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
e5463e8f4e
commit
d7c4447dd2
@ -232,9 +232,7 @@ public class NettyRpcServer extends RpcServer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getNumOpenConnections() {
|
public int getNumOpenConnections() {
|
||||||
int channelsCount = allChannels.size();
|
return allChannels.size();
|
||||||
// allChannels also contains the server channel, so exclude that from the count.
|
|
||||||
return channelsCount > 0 ? channelsCount - 1 : channelsCount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSSL(ChannelPipeline p, boolean supportPlaintext)
|
private void initSSL(ChannelPipeline p, boolean supportPlaintext)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user