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

Question: Lifetime of a Connection #27

Open
sll552 opened this issue Jul 11, 2022 · 0 comments
Open

Question: Lifetime of a Connection #27

sll552 opened this issue Jul 11, 2022 · 0 comments

Comments

@sll552
Copy link

sll552 commented Jul 11, 2022

I have a question regarding the intended usage of this lib.

how long can I keep a Connection Object without closing it? I want to use the SDK in a wrapper class for a long running service, so I would setup the connection using ConnectionBuilder and keep it as field in my wrapper class whose methods are called several times (with long or short timespans between calls) throughout the lifetime of my service. If the service gets restarted/stopped I would call close().

Is this the intended usage or should I build a new connection for each set of calls I have to make to the API and then close it? In the mentioned service this would most likely mean everytime a method in the wrapper is called a new connection is built and closed respectively.

Thanks in advance.

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

No branches or pull requests

1 participant