Skip to content

Commit

Permalink
Merge pull request #41824 from geoand/#41811
Browse files Browse the repository at this point in the history
Properly close AsyncFile in Quarkus REST
  • Loading branch information
geoand authored Jul 11, 2024
2 parents dbced0b + a010cbd commit 929c697
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 929c697

Please sign in to comment.