INFRA-3503 | Dhruv | manually close gocd client

This commit is contained in:
dhruvjoshi
2024-07-11 00:06:54 +05:30
committed by Abhishek Katiyar
parent cfdd42752a
commit a7a8035cfc

View File

@@ -67,6 +67,7 @@ public class GocdClient {
HttpPost request = createRequest(filePath);
CloseableHttpResponse response = httpClient.execute(request);
String responseString = EntityUtils.toString(response.getEntity());
httpClient.close();
return objectMapper.readTree(responseString);
} catch (Exception e) {
throw new GocdValidationException(e.getMessage());