Skip to content

Commit 686653a

Browse files
committed
Close response bodies after successfully setting statuses
1 parent db9e609 commit 686653a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/com/spotify/github/v3/clients/RepositoryClient.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ public CompletableFuture<Void> setCommitStatus(
221221
final String path = String.format(STATUS_URI_TEMPLATE, owner, repo, sha);
222222
return github
223223
.post(path, github.json().toJsonUnchecked(request))
224-
.thenAccept(IGNORE_RESPONSE_CONSUMER);
224+
.thenAccept(response -> {
225+
if (response.body() != null) {
226+
response.body().close();
227+
}
228+
});
225229
}
226230

227231
/**

0 commit comments

Comments
 (0)