On Mon, 16 Jun 2025 10:23:25 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
>> Thanks, now I see. Those resource usages in `FileServerHandler` should >> ideally be wrapped in try-with-resources, but that is out of the scope of >> this work. > >> Those resource usages in FileServerHandler should ideally be wrapped in >> try-with-resources, but that is out of the scope of this work. > > Agreed and I've put it in my TODO list. That won't fix this current issue > though (I think you understand that, but just stating here for the sake of > completeness). I believe that Volkan has a point - provided that FileServerHandler always eventually closes the file. Each new request will be submitted to the executor by the HttpServer, therefore waiting for the executor to finish should ensure that FileServerHandler::handle has finished, and therefore that the the file has been closed. Provided there's no rogue connection to the server... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25820#discussion_r2149713777