Skip to content

Commit

Permalink
Properly close AsyncFile in Quarkus REST
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jul 11, 2024
1 parent a0a7fb5 commit a010cbd
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 a010cbd

Please sign in to comment.