You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Styx connections.total-connections count can get negative.
Detailed description
Most likely culprit is the channelRegistered handler in ExcessConnectionRejector.
@Override
public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
if (channelGroup.size() >= maxConnectionsCount) {
LOGGER.warn("Max allowed connection to server exceeded: current={} configured={}", channelGroup.size(), maxConnectionsCount);
ctx.close();
return;
}
channelGroup.add(ctx.channel());
super.channelRegistered(ctx);
}
I suspect calling ctx.close() fromchannelRegistered triggers a channelInactive event without corresponding channelActive. As a result, ChannelStatisticsHandler ends up seeing more channel inactive than channel active events, and the count may drift below zero.
Acceptance criteria
A rejected connection is neutral with respect to total-connections count.
The text was updated successfully, but these errors were encountered:
The problem
Styx
connections.total-connections
count can get negative.Detailed description
Most likely culprit is the
channelRegistered
handler inExcessConnectionRejector
.I suspect calling
ctx.close()
fromchannelRegistered
triggers achannelInactive
event without correspondingchannelActive
. As a result,ChannelStatisticsHandler
ends up seeing more channel inactive than channel active events, and the count may drift below zero.Acceptance criteria
The text was updated successfully, but these errors were encountered: