bchavez / RethinkDb.Driver

:headphones: A NoSQL C#/.NET RethinkDB database driver with 100% ReQL API coverage.
http://rethinkdb.com/api/java
Other
384 stars 134 forks source link

Fix NotSupportedException when connecting to an IPv6 address #112

Closed gjhommersom closed 7 years ago

gjhommersom commented 7 years ago

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

bchavez commented 7 years ago

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 :cookie: in the wild for a few.

Thanks again for reporting the issue. Brian

:beach_umbrella: :trumpet: Beach Boys - Good Vibrations (Nick Warren bootleg)