diff --git a/src/main/java/com/spotify/github/v3/clients/GitHubClient.java b/src/main/java/com/spotify/github/v3/clients/GitHubClient.java index 2d4d9e92..d884b5e1 100644 --- a/src/main/java/com/spotify/github/v3/clients/GitHubClient.java +++ b/src/main/java/com/spotify/github/v3/clients/GitHubClient.java @@ -65,7 +65,11 @@ */ public class GitHubClient { - static final Consumer IGNORE_RESPONSE_CONSUMER = (ignore) -> {}; + static final Consumer IGNORE_RESPONSE_CONSUMER = (response) -> { + if (response.body() != null) { + response.body().close(); + } + }; static final TypeReference> LIST_COMMENT_TYPE_REFERENCE = new TypeReference<>() {}; static final TypeReference> LIST_REPOSITORY =