Skip to content

Commit bef374a

Browse files
Add back the logic to clear the files after use in MessageAction
1 parent 66ec4dc commit bef374a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/main/java/net/dv8tion/jda/internal/requests/restaction/MessageActionImpl.java

+2
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ protected RequestBody asMultipart()
528528
{
529529
MultipartBody.Builder body = AttachedFile.createMultipartBody(files, null);
530530
body.addFormDataPart("payload_json", getJSON().toString());
531+
// clear remaining resources, they will be closed after being sent
532+
files.clear();
531533
return body.build();
532534
}
533535

0 commit comments

Comments
 (0)