Simplify and fix c-ares TCP path on Windows#19397
Merged
apolcyn merged 2 commits intogrpc:masterfrom Jun 26, 2019
Merged
Conversation
400b1e4 to
03797e0
Compare
Contributor
Author
nicolasnoble
approved these changes
Jun 21, 2019
markdroth
approved these changes
Jun 21, 2019
Member
markdroth
left a comment
There was a problem hiding this comment.
Approving for ownership. I have not actually reviewed the code; I am relying on Nico to have done that.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the bug brought up in this comment: #18411 (comment)
Overall, this change makes the following main changes:
ConnectExto connect TCP sockets. UsingWSAConnectfor TCP sockets is broken - TCP queries work in manual tests with the local DNS server in manual test script, only because, as it appears, the connect is fast enough and the verbose logs slows things down enough that we get lucky and avoid hittingWSAENOTCONNerrors on reads and writes of TCP sockets.WSAErrorContextobject for propagating socket errors to c-aresSo far I've been testing this with a one-off AAAA record in the GCP testing project called
large-aaaa-record.apolcyn.exp-test-zone, which has ~40 IPv6 addresses and is ~1K in size, so triggers TCP fallback. I'm trying to figure out if there's a way that I can publish an externally visible DNS record under theunittest.grpc.iodomain. But that aside, this is ready for review.Original repro test scripts being added in #19459