diff --git a/src/main/java/com/gmail/nossr50/util/uuid/UUIDFetcher.java b/src/main/java/com/gmail/nossr50/util/uuid/UUIDFetcher.java index 995a11513..1da4ddd16 100644 --- a/src/main/java/com/gmail/nossr50/util/uuid/UUIDFetcher.java +++ b/src/main/java/com/gmail/nossr50/util/uuid/UUIDFetcher.java @@ -49,7 +49,9 @@ public class UUIDFetcher implements Callable> { String body = array.toString(); writeBody(connection, body); - JsonObject[] jsonStreamArray = gson.fromJson(new InputStreamReader(connection.getInputStream()), JsonObject[].class); + InputStreamReader tempStream = new InputStreamReader(connection.getInputStream()); + JsonObject[] jsonStreamArray = gson.fromJson(tempStream, JsonObject[].class); + tempStream.close(); for (JsonObject jsonProfile : jsonStreamArray) { String id = jsonProfile.get("id").getAsString();