EnrichedResponse.file leaks open files #440
Closed
Labels
Comments
@trym-moeller are you running in local file mode? E.g., with the |
@cacoco I have not explicit set the |
@trym-moeller Ok. Addressed in dafe725. Let us know if you still encounter issues. Thanks! |
Thanks @cacoco |
@trym-moeller it'll be in the next release (in January). Otherwise you can build the current develop branch locally following the guidelines in the CONTRIBUTING.md by first building the dependencies, then building Finatra. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EnrichedResponse.file opens a file, but nothing seems to close it again
Expected behavior
When returning a file in a Finatra Controller, I expect the returned file to be closed when the request/response is finished.
I am using code as follows
Which is using
Actual behavior
The current code leaves the file open in jvm increasing the number of open files on the OS.
Steps to reproduce the behavior
Add a controller to a finatra server as described above, invoke the controller (e.g. in a browser /myfile.json), try to delete the file (on Windows this gives an error message like "cannot delete an open file") or on a more fun OS count the number of open files before and after.
The text was updated successfully, but these errors were encountered: