Skip to content

Commit e05d14d

Browse files
Fix error An address incompatible with the requested protocol was used at OpenDataConnection. (#1096)
On #948 the filter a => (a.AddressFamily == _DataSocket.AddressFamily) was accidentally lost.
1 parent 66e4225 commit e05d14d

File tree

1 file changed

+1
-1
lines changed
  • dotnet/src/dotnetframework/GxClasses/Domain

1 file changed

+1
-1
lines changed

dotnet/src/dotnetframework/GxClasses/Domain/GxFtp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ private void OpenControlConnection(Uri uriToConnect)
680680
private IPAddress GetIpAddress(string host)
681681
{
682682
IPHostEntry serverHostEntry = Dns.GetHostEntry(host);
683-
IPAddress ipAddresses = serverHostEntry.AddressList.FirstOrDefault();
683+
IPAddress ipAddresses = serverHostEntry.AddressList.FirstOrDefault(a => (a.AddressFamily == _DataSocket.AddressFamily));
684684
GXLogging.Debug(log, $"GetHostEntry({host}) AddressList length: ", serverHostEntry.AddressList.Length.ToString());
685685
if (ipAddresses == null)
686686
{

0 commit comments

Comments
 (0)