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

Keep client alive. #867

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Keep client alive. #867

merged 1 commit into from
Oct 4, 2023

Conversation

floitsch
Copy link
Member

@floitsch floitsch commented Oct 4, 2023

No description provided.

@floitsch floitsch requested a review from kasperl October 4, 2023 13:34
Copy link
Contributor

@kasperl kasperl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

block.call response
finally:
client.close
if not client_:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we never close the client here. That's probably fine in the cli.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that the broker needs to be closed.
Typically we instantiate the client already in the constructor. However, here we delay the instantiation of the client in case we only want to use authentication.

@floitsch floitsch merged commit 6e4368a into main Oct 4, 2023
@floitsch floitsch deleted the floitsch/keep_http_client branch October 4, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants