1
0
mirror of https://github.com/google/nomulus synced 2026-01-07 22:15:30 +00:00

Add connection.disconnect() in finally blocks (#2189)

This commit is contained in:
Lai Jiang
2023-10-23 16:38:16 -04:00
committed by GitHub
parent fe710e5510
commit d210bed744
3 changed files with 6 additions and 0 deletions

View File

@@ -121,6 +121,8 @@ public final class Marksdb {
return getResponseBytes(connection);
} catch (IOException e) {
throw new IOException(String.format("Error connecting to MarksDB at URL %s", url), e);
} finally {
connection.disconnect();
}
}

View File

@@ -225,6 +225,8 @@ public final class NordnUploadAction implements Runnable {
cloudTasksUtils.enqueue(NordnVerifyAction.QUEUE, makeVerifyTask(new URL(location)));
} catch (IOException e) {
throw new IOException(String.format("Error connecting to MarksDB at URL %s", url), e);
} finally {
connection.disconnect();
}
}

View File

@@ -148,6 +148,8 @@ public final class NordnVerifyAction implements Runnable {
return log;
} catch (IOException e) {
throw new IOException(String.format("Error connecting to MarksDB at URL %s", url), e);
} finally {
connection.disconnect();
}
}
}