Less error for IOExceptions, more debug for exceptions in the exception handler.
This commit is contained in:
parent
c1ff4ffb89
commit
d54f2462a8
@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
||||||
import io.netty.handler.timeout.ReadTimeoutException;
|
import io.netty.handler.timeout.ReadTimeoutException;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.connection.CancelSendSignal;
|
import net.md_5.bungee.connection.CancelSendSignal;
|
||||||
@ -78,13 +79,23 @@ public class HandlerBoss extends ChannelInboundMessageHandlerAdapter<byte[]>
|
|||||||
if ( cause instanceof ReadTimeoutException )
|
if ( cause instanceof ReadTimeoutException )
|
||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, handler + " - read timed out" );
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, handler + " - read timed out" );
|
||||||
|
}
|
||||||
|
if ( cause instanceof IOException )
|
||||||
|
{
|
||||||
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, handler + " - IOException: " + cause.getMessage() );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.SEVERE, handler + " - encountered exception", cause );
|
ProxyServer.getInstance().getLogger().log( Level.SEVERE, handler + " - encountered exception", cause );
|
||||||
}
|
}
|
||||||
if ( handler != null )
|
if ( handler != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
handler.exception( cause );
|
handler.exception( cause );
|
||||||
|
} catch ( Exception ex )
|
||||||
|
{
|
||||||
|
ProxyServer.getInstance().getLogger().log( Level.SEVERE, handler + " - exception processing exception", ex );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ctx.close();
|
ctx.close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user