Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly close AsyncFile in Quarkus REST
Browse files Browse the repository at this point in the history
geoand authored and danielsoro committed Sep 20, 2024

Verified

This commit was signed with the committer’s verified signature.
danielsoro Daniel Cunha
1 parent 4d9cbea commit f510d7e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit f510d7e

Please sign in to comment.