Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak of the callChoreo access token request helper function #200

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading