Make sure URL connection is closed

This commit is contained in:
M66B
2021-07-15 08:36:55 +02:00
parent 64e48fdc76
commit b8e04341ab
7 changed files with 30 additions and 25 deletions

View File

@@ -82,7 +82,7 @@ public class IPInfo {
try {
int status = connection.getResponseCode();
if (status != HttpsURLConnection.HTTP_OK)
throw new FileNotFoundException("Error " + status + ":" + connection.getResponseMessage());
throw new FileNotFoundException("Error " + status + ": " + connection.getResponseMessage());
String response = Helper.readStream(connection.getInputStream());
organization.name = response.trim();