Skip to content

Commit

Permalink
Merge pull request #200 from sadilchamishka/fix-memory-leak-callchoreo
Browse files Browse the repository at this point in the history
Fix memory leak of the callChoreo access token request helper function
  • Loading branch information
sadilchamishka authored Jan 16, 2025
2 parents 11f75ce + df73476 commit f3d56f9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ public void completed(HttpResponse httpResponse) {

boolean isFailure = false;
try {
LOG.debug("Access token response received.");
LOG.info("Access token response received. Session data key: " +
authenticationContext.getContextIdentifier());
int responseCode = httpResponse.getStatusLine().getStatusCode();
if (responseCode == HTTP_STATUS_OK) {
Type responseBodyType = new TypeToken<Map<String, String>>() { }.getType();
Expand Down Expand Up @@ -372,6 +373,8 @@ public void completed(HttpResponse httpResponse) {
LOG.error("Error occurred while handling the token response from Choreo. Session data key: " +
authenticationContext.getContextIdentifier(), e);
isFailure = true;
} finally {
EntityUtils.consumeQuietly(httpResponse.getEntity());
}

if (isFailure) {
Expand Down

0 comments on commit f3d56f9

Please sign in to comment.