Skip to content
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

[WebServer.java] close opened file descriptors properly #60

Closed

Conversation

bryonglodencissp
Copy link

🐛 label: resource-leak

Greetings,

Calling fis.close(); here will ensure here will ensure the file descriptor is properly disposed of and we will not run out of resources for more files. Even if it's closed automatically by the system when exiting the process, we believe you should release fis when done with it.

Signed-off-by: Bryon Gloden, CISSP® cissp@bryongloden.com

@n8fr8
Copy link
Member

n8fr8 commented Dec 23, 2017

Hmm, will need to test to make sure the Response object being returned by the method doesn't expect the fis to still be available. This is probably good though. Thanks!

@n8fr8
Copy link
Member

n8fr8 commented Dec 27, 2017

Yeah, this doesn't work. We need to keep the stream open in order to handle the chunked response.

@n8fr8 n8fr8 closed this Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants