Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't close health check directly #3690

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter

private ChannelWrapper channel;
private PacketHandler handler;
private boolean healthCheck;

public void setHandler(PacketHandler handler)
{
Expand Down Expand Up @@ -96,7 +97,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
channel.setRemoteAddress( newAddress );
} else
{
channel.close();
healthCheck = true;
}
} finally
{
Expand Down Expand Up @@ -146,7 +147,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E
{
if ( ctx.channel().isActive() )
{
boolean logExceptions = !( handler instanceof PingHandler );
boolean logExceptions = !( handler instanceof PingHandler ) && !healthCheck;

if ( logExceptions )
{
Expand Down