-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NettyInputStream ByteBuf leak #4222
Conversation
Please follow the WIKI |
Signed-off-by: Franck Séhédic <franck.sehedic@ledger.fr>
Signed-off-by: Franck Séhédic <franck.sehedic@ledger.fr>
@@ -87,6 +87,8 @@ public int read(byte[] b, int off, int len) throws IOException { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please update copyright year in both files (to 2019) - copyright header at the top of each file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for changes, and a question - you are changing method read(byte[] b, int off, int len)
but immediately under this method there is method read()
without any parameters, but inner logic looks very similar, except the very reading. So, the question - shall InputStream take
be closed as well in the read()
method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I refactored the code a bit to avoid this mistake in the future.
Signed-off-by: Franck Séhédic <franck.sehedic@ledger.fr>
Signed-off-by: Franck Séhédic <franck.sehedic@ledger.fr>
Signed-off-by: Franck Séhédic <franck.sehedic@ledger.fr>
* Fix NettyInputStream ByteBuf leak in jersey/netty HTTP2 Handler Signed-off-by: Franck Séhédic <franck.sehedic@ledger.fr>
If not closed here
take
goes unreferenced leading to a leak of the underlying ByteBuf.LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.