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

reduce client close bookkeeping #1297

Merged
merged 1 commit into from
Mar 1, 2019
Merged

reduce client close bookkeeping #1297

merged 1 commit into from
Mar 1, 2019

Conversation

nelz9999
Copy link
Contributor

@nelz9999 nelz9999 commented Mar 1, 2019

Instead of carrying around a symbol for ownClient, just embed the Client passed in by the caller with a wrapper that disables invoking Close().

@ghost ghost added the cla-needed label Mar 1, 2019
@nelz9999
Copy link
Contributor Author

nelz9999 commented Mar 1, 2019

(fyi, I've now signed the CLA.)

@nelz9999
Copy link
Contributor Author

nelz9999 commented Mar 1, 2019

There is only 1 fail out of 6 tests, but I don't believe it has anything to do with the code I changed...?

@ghost ghost removed the cla-needed label Mar 1, 2019
@bai bai requested a review from varun06 March 1, 2019 06:37
// through unchanged). This is for use in larger structs
// where it is undesirable to close the client that was
// passed in by the caller.
type nopCloserClient struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

really like this pattern, we also do this wrapping pattern in one of our internal library. 👍

Copy link
Contributor

@varun06 varun06 left a comment

Choose a reason for hiding this comment

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

Great change, it improves readablity for sure. Let's see if we can make the tests passed.

@bai
Copy link
Contributor

bai commented Mar 1, 2019

Thank you! 💯

@bai bai merged commit b14e3c6 into IBM:master Mar 1, 2019
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.

3 participants