Skip to content

Feature/client timeouts#248

Open
drewwells wants to merge 3 commits intomasterfrom
feature/clientTimeouts
Open

Feature/client timeouts#248
drewwells wants to merge 3 commits intomasterfrom
feature/clientTimeouts

Conversation

@drewwells
Copy link
Contributor

This should be backwards compatibility for building, but it will alter some behavior. It is now possible to call Validate() long after the 'Connect()' is called. Connect no longer blocks, and will perform the tcp connection in the background.

It will be possible to cancel ValidateContext() calls where previously this used the confusing 'connTimeout' or 'context' of the initial client setup. was not possible unless the client was built shortly before the Validate() call is made or the confusing 'connTimeout' is used. connTimeout would timeout grpc.Dial and would do things on the validate.

Validate() continues the same odd behavior of using the connTimeout flag or the client context, neither of these will do what the client is likely to expect so it should not be used.

I didn't touch the Client interface, b/c the streaming client is not generally used and I didn't feel fit to tackle it. Instead users can leverage ValidateContext by type conversion. NewClient().(*UnaryClient).

@drewwells
Copy link
Contributor Author

dependent on #247

@drewwells drewwells force-pushed the feature/clientTimeouts branch from 357202a to 10b64ec Compare April 3, 2020 03:10
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.

1 participant