Make exceptions thrown by QueryHandler nicer. (#1741)

Previously, they would result in a large and scary message from Netty. This instead sends the message to the BungeeCord logger and de-establishes the connection.
This commit is contained in:
Andrew 2016-11-05 20:48:24 -04:00 committed by md-5
parent 987f2d0eb2
commit ee256d0a8d

View File

@ -141,4 +141,10 @@ public class QueryHandler extends SimpleChannelInboundHandler<DatagramPacket>
ctx.writeAndFlush( response ); ctx.writeAndFlush( response );
} }
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
{
bungee.getLogger().log( Level.WARNING, "Error whilst handling query packet from " + ctx.channel().remoteAddress(), cause );
}
} }