Some inconsistency between the example code and the use guide #13952
laglangyue
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://netty.io/wiki/user-guide-for-4.x.html
io.netty.example.discard
in useguide
DiscardServerHandler extends ChannelInboundHandlerAdapter
write the code
((ByteBuf) msg).release();
in methodchannelRead0
The full source code of the discard server is located in the [io.netty.example.discard
But in example
DiscardClientHandler extends SimpleChannelInboundHandler
when I write the code
((ByteBuf) msg).release();
it cause a exception:
IllegalReferenceCountException: refCnt: 0, decrement: 1
I think this inconsistency may cause confusion for beginners
Beta Was this translation helpful? Give feedback.
All reactions