Fix NotSupportedException when connecting to an IPv6 address
gjhommersom opened this issue · comments
When the driver tries to connect to a IPv6 address a NotSupportedException is throw. This occurs because the address family is fixed to IPv4. It should be possible to use the address family of the address to fix this issue.
Line 119 of SocketWrapper.cs
Existing:
var s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Desired:
var s = new Socket(address.AddressFamily, SocketType.Stream, ProtocolType.Tcp)
Version: 2.3.15.0
OS: Windows 10
.Net Framework: 4.5.2
Hi @gjhommersom , thanks for the bug report.
v2.3.18-beta-1
should resolve your issue.
I think this Socket(AddressFamily,..
change was originally part of #62 reported by @ThomasHoest where he had an issue connecting to a service on Azure.
@ThomasHoest, if you get a chance, could you check v2.3.18-beta-1
to make sure we didn't break your app with the change?
I'll take the beta tag off once we have this change bake
Thanks again for reporting the issue.
Brian