1.九月 23, 2018 8:35:02 下午 io.netty.channel.ChannelInitializer channelRegistered
警告: Failed to initialize a channel. Closing: [id: 0xa09c718b, /127.0.0.1:50509 => /127.0.0.1:9999]
io.netty.channel.ChannelPipelineException: com.sxt.netty.first.Server4HelloWorldHandler is not a @Sharable handler, so can‘t be added or removed multiple times.
at io.netty.channel.DefaultChannelPipeline.checkMultiplicity(DefaultChannelPipeline.java:565)
at io.netty.channel.DefaultChannelPipeline.addLast0(DefaultChannelPipeline.java:152)
at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:146)
at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:329)
at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:300)
at com.sxt.netty.first.Server4HelloWorld$1.initChannel(Server4HelloWorld.java:70)
解决:使用@Sharable
原文地址:http://blog.51cto.com/59465168/2324976