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

Do connections need management? #60

Open
Sotorin opened this issue Feb 16, 2018 · 0 comments
Open

Do connections need management? #60

Sotorin opened this issue Feb 16, 2018 · 0 comments

Comments

@Sotorin
Copy link

Sotorin commented Feb 16, 2018

I've looked at the examples folder and I saw how the connection is created:

con, err := goriak.Connect(goriak.ConnectOpts{Address: "127.0.0.1"})

Do we have to manage this somehow like defer conn.Close() (I have not seen such API call) or is it entirely managed via underlying riak-go-client?

Their (Basho's) code does something like this:

defer func() { stopping = true close(sc) if serr := c.Stop(); serr != nil { util.ErrExit(serr) } close(sdc) close(fdc) }()

Nice repo BTW, I'm playing with it right now, good work!

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