File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/main/java/edu/harvard/iq/dataverse/api Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -175,11 +175,14 @@ public Response updateCitationsForDataset(@PathParam("id") String id) throws IOE
175175 int status = connection .getResponseCode ();
176176 if (status != 200 ) {
177177 logger .warning ("Failed to get citations from " + url .toString ());
178+ connection .disconnect ();
178179 return error (Status .fromStatusCode (status ), "Failed to get citations from " + url .toString ());
179180 }
180181 JsonObject report ;
181182 try (InputStream inStream = connection .getInputStream ()) {
182183 report = JsonUtil .getJsonObject (inStream );
184+ } finally {
185+ connection .disconnect ();
183186 }
184187 JsonObject links = report .getJsonObject ("links" );
185188 JsonArray data = report .getJsonArray ("data" );
You can’t perform that action at this time.
0 commit comments