parent
07df657f3c
commit
006a14a75c
@ -30,6 +30,7 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
|||||||
|
|
||||||
private ChannelWrapper channel;
|
private ChannelWrapper channel;
|
||||||
private PacketHandler handler;
|
private PacketHandler handler;
|
||||||
|
private boolean healthCheck;
|
||||||
|
|
||||||
public void setHandler(PacketHandler handler)
|
public void setHandler(PacketHandler handler)
|
||||||
{
|
{
|
||||||
@ -96,7 +97,7 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
|||||||
channel.setRemoteAddress( newAddress );
|
channel.setRemoteAddress( newAddress );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
channel.close();
|
healthCheck = true;
|
||||||
}
|
}
|
||||||
} finally
|
} finally
|
||||||
{
|
{
|
||||||
@ -146,7 +147,7 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
|||||||
{
|
{
|
||||||
if ( ctx.channel().isActive() )
|
if ( ctx.channel().isActive() )
|
||||||
{
|
{
|
||||||
boolean logExceptions = !( handler instanceof PingHandler );
|
boolean logExceptions = !( handler instanceof PingHandler ) && !healthCheck;
|
||||||
|
|
||||||
if ( logExceptions )
|
if ( logExceptions )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user