首页 > Web开发 > 详细

netty报错:io.netty.channel.ChannelPipelineException

时间:2018-12-03 00:42:12      阅读:1765      评论:0      收藏:0      [点我收藏+]
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

netty报错:io.netty.channel.ChannelPipelineException

原文:http://blog.51cto.com/59465168/2324976

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!