mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-28 05:05:21 +01:00
Don't log full CorruptedFrameException
This commit is contained in:
parent
d3bd785289
commit
e9ba95b9dc
@ -3,6 +3,7 @@ package net.md_5.bungee.netty;
|
|||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||||
|
import io.netty.handler.codec.CorruptedFrameException;
|
||||||
import io.netty.handler.codec.DecoderException;
|
import io.netty.handler.codec.DecoderException;
|
||||||
import io.netty.handler.codec.haproxy.HAProxyMessage;
|
import io.netty.handler.codec.haproxy.HAProxyMessage;
|
||||||
import io.netty.handler.timeout.ReadTimeoutException;
|
import io.netty.handler.timeout.ReadTimeoutException;
|
||||||
@ -130,18 +131,27 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
|||||||
if ( cause instanceof ReadTimeoutException )
|
if ( cause instanceof ReadTimeoutException )
|
||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - read timed out", handler );
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - read timed out", handler );
|
||||||
} else if ( cause instanceof DecoderException && cause.getCause() instanceof BadPacketException )
|
} else if ( cause instanceof DecoderException )
|
||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - bad packet ID, are mods in use!? {1}", new Object[]
|
if ( cause instanceof CorruptedFrameException )
|
||||||
{
|
{
|
||||||
handler, cause.getCause().getMessage()
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - corrupted frame: {1}", new Object[]
|
||||||
} );
|
{
|
||||||
} else if ( cause instanceof DecoderException && cause.getCause() instanceof OverflowPacketException )
|
handler, cause.getMessage()
|
||||||
{
|
} );
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - overflow in packet detected! {1}", new Object[]
|
} else if ( cause.getCause() instanceof BadPacketException )
|
||||||
{
|
{
|
||||||
handler, cause.getCause().getMessage()
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - bad packet ID, are mods in use!? {1}", new Object[]
|
||||||
} );
|
{
|
||||||
|
handler, cause.getCause().getMessage()
|
||||||
|
} );
|
||||||
|
} else if ( cause.getCause() instanceof OverflowPacketException )
|
||||||
|
{
|
||||||
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - overflow in packet detected! {1}", new Object[]
|
||||||
|
{
|
||||||
|
handler, cause.getCause().getMessage()
|
||||||
|
} );
|
||||||
|
}
|
||||||
} else if ( cause instanceof IOException || ( cause instanceof IllegalStateException && handler instanceof InitialHandler ) )
|
} else if ( cause instanceof IOException || ( cause instanceof IllegalStateException && handler instanceof InitialHandler ) )
|
||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - {1}: {2}", new Object[]
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - {1}: {2}", new Object[]
|
||||||
|
Loading…
Reference in New Issue
Block a user