From: EgorBo Date: Wed, 15 Mar 2017 22:11:11 +0000 (+0300) Subject: [System.Data] Fix bug-53217: use AddressFamily.InterNetworkV6 when needed X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=f53004b1714241bd8698beba1cf8f85e48944b1c;p=mono.git [System.Data] Fix bug-53217: use AddressFamily.InterNetworkV6 when needed --- diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs index 3892035220c..8e19ec9af96 100644 --- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs +++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs @@ -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))