Fix connection by IPv4 address.
This commit is contained in:
devMikeUA 2019-07-11 14:48:06 +03:00
parent 3224113e4c
commit 7a6350d6f3

View file

@ -19,7 +19,7 @@ namespace TLSharp.Core.Network
var ipAddress = IPAddress.Parse(address);
var endpoint = new IPEndPoint(ipAddress, port);
_tcpClient = new TcpClient(endpoint);
_tcpClient = new TcpClient(ipAddress.AddressFamily);
_tcpClient.Connect(endpoint);
}
else