Skip to content

Commit

Permalink
Properly close AsyncFile in Quarkus REST
Browse files Browse the repository at this point in the history
Fixes: quarkusio#41811
(cherry picked from commit a010cbd)
  • Loading branch information
geoand authored and gsmet committed Jul 16, 2024
1 parent 277cc25 commit 1f57bd1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public void writeResponse(AsyncFile file, Type genericType, ServerRequestContext
file.endHandler(new Runnable() {
@Override
public void run() {
file.close();
// we don't need to wait for the file to be closed, we just need to make sure it does get closed
//noinspection ResultOfMethodCallIgnored
file.close().subscribeAsCompletionStage();
response.end();
// Not sure if I need to resume, actually
ctx.resume();
Expand Down

0 comments on commit 1f57bd1

Please sign in to comment.