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: fix socket leak in impersonated_credentials #1123

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions google/auth/impersonated_credentials.py
Expand Up @@ -288,9 +288,12 @@ def sign_bytes(self, message):

authed_session = AuthorizedSession(self._source_credentials)

response = authed_session.post(
url=iam_sign_endpoint, headers=headers, json=body
)
try:
response = authed_session.post(
url=iam_sign_endpoint, headers=headers, json=body
)
finally:
authed_session.close()

if response.status_code != http_client.OK:
raise exceptions.TransportError(
Expand Down
Binary file modified system_tests/secrets.tar.enc
Binary file not shown.