-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
PemReader #10974
Milestone
Comments
Yes at the moment we expect you to call close... That said I can't think of a good reason why we shouldn't call close here one we consumed the stream. I will open a PR to change this |
normanmaurer
added a commit
that referenced
this issue
Jan 29, 2021
…te key Motivation: At the moment we not close the streams once we are done reading which could lead to ta fd leak if the user not explicit close these. We should just close these once we consumed the streams Modifications: - Always close the streams - Add unit tests Result: Fixes #10974
Should be fixed by #10976 |
normanmaurer
added a commit
that referenced
this issue
Jan 31, 2021
…as build Motivation: It was not 100% clear whom is responsible calling close() on the InputStream. Modifications: Clarify javadocs. Result: Related to #10974
Clarified javadocs in #10983 |
2 tasks
/lgtm |
raidyue
pushed a commit
to raidyue/netty
that referenced
this issue
Jul 8, 2022
…netty#10983) Motivation: It was not 100% clear who is responsible calling close() on the InputStream. Modifications: Clarify javadocs. Result: Related to netty#10974 Co-authored-by: Chris Vest <christianvest_hansen@apple.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
hi , I have a few confuse. it seem PemRead.java have not close InputStream at
readPrivateKey
andreadContent method
?https://github.com/netty/netty/blob/4.1/handler/src/main/java/io/netty/handler/ssl/PemReader.java
why neety don't close it ?
Are they not make open file leak?
if i use SslContextBuilder for build ssl
SslContextBuilder forServer(InputStream keyCertChainInputStream, InputStream keyInputStream)
the method call stack seems are not close InputStream yet ?
it is mean I need close it by myself?
Actual behavior
it seems i got file open leak?
Steps to reproduce
N/A
Minimal yet complete reproducer code (or URL to code)
N/A
Netty version
netty-all-4.1.25.Final.jar
JVM version (e.g.
java -version
)java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
OS version (e.g.
uname -a
)uname -a
Linux ip-10-0-4-111.ec2.internal 3.10.0-862.3.2.el7.x86_64 #1 SMP Mon May 21 23:36:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: