处理一个netty异常

来源:互联网 发布:淘宝cd 编辑:程序博客网 时间:2024/06/07 10:00
AM io.netty.channel.DefaultChannelPipeline$TailContext exceptionCaught

WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.


处理方式:
     处理业务的handler里面增加

public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {  
        ctx.close();  
    }