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 client.Clone() to include the address. #10077

Merged
merged 4 commits into from
Nov 6, 2020
Merged

Fix client.Clone() to include the address. #10077

merged 4 commits into from
Nov 6, 2020

Conversation

raskchanky
Copy link
Collaborator

Additionally, add getters for any setters that didn't already have them. Also beef up the test to exhaustively test every getter/setter combo.

Closes #9905

@raskchanky raskchanky requested a review from ncabatoff October 2, 2020 20:52
api/client.go Outdated

return NewClient(newConfig)
err = client.SetAddress(newConfig.Address)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking at the code some more I'm confused why we need to call SetAddress here, since NewClient does the equivalent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll double check this to be sure, but my memory is that either client.addr or config.Address ended up not being set correctly without this line.

@raskchanky
Copy link
Collaborator Author

@ncabatoff I believe I addressed all of your feedback, in addition to adding 2 new getters for AgentAddress and SRVLookup, and some additional testing.

@raskchanky raskchanky added this to the 1.6.1 milestone Nov 5, 2020
Additionally, add getters for any setters that didn't already have them.
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.

api.Client.Clone() forgets parameters set using Set* methods
2 participants