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 query client connection fails with IPv6 #713

Merged
merged 2 commits into from
Jan 17, 2020

Conversation

EverfreeFaerie
Copy link
Contributor

The default constructor of TcpClient initializes a socket with the InterNetwork (IPv4) address family. Trying to connect using an IPv6 address then results in an exception. The documentation of the TcpClient default constructor states that:

This constructor works only with IPv4 address types.

To fix that, the client is created right before connecting, passing the address family of the remoteAddress to the constructor.

@Flakebi
Copy link
Collaborator

Flakebi commented Jan 9, 2020

Hi,
thanks for the pull-request!
IPv6 should really be supported.
Looks good to me, @Splamy will probably review it in a few days.

@Splamy
Copy link
Owner

Splamy commented Jan 17, 2020

Thanks for your pull request.
This is indeed a very annoying legacy quick from c#. I've fixed in the full cient but obiously forgot it for the query client.
Also, while I appreciate your detailed (and witty) comment in the code for the change, I don't think it's neccessary to comment it out in detail in the code there.

@Splamy Splamy merged commit 65aa9a1 into Splamy:master Jan 17, 2020
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