Fixed: Close the readers after fetching the repo api details

This commit is contained in:
Bram 2024-07-08 11:20:01 +02:00
parent 2e684dd561
commit 03e120d24d
No known key found for this signature in database
GPG key ID: 13E608068F40E3CC

View file

@ -54,6 +54,9 @@ public final class GithubUpdater {
String response = reader.readLine();
JsonObject json = AdventureSerializer.getGsonSerializer().serializer().fromJson(response, JsonObject.class);
reader.close();
isr.close();
if (json.has("tag_name")) {
return PEVersion.fromString(json.get("tag_name").getAsString().replaceFirst("^[vV]", ""));
}