[System.Data] Fix bug-53217: use AddressFamily.InterNetworkV6 when needed
authorEgorBo <egorbo@gmail.com>
Wed, 15 Mar 2017 22:11:11 +0000 (01:11 +0300)
committerMarek Safar <marek.safar@gmail.com>
Wed, 22 Mar 2017 09:46:47 +0000 (10:46 +0100)
mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs

index 3892035220ce24f61a90e9f1c0c7a632f7936e73..8e19ec9af9649c6f84577ae83c41fbacb08fb64a 100644 (file)
@@ -105,7 +105,7 @@ namespace Mono.Data.Tds.Protocol {
                        }
 
                        try {
-                               socket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                               socket = new Socket (endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
                                IAsyncResult ares = socket.BeginConnect (endPoint, null, null);
                                int timeout_ms = timeout * 1000;
                                if (timeout > 0 && !ares.IsCompleted && !ares.AsyncWaitHandle.WaitOne (timeout_ms, false))