8000 Remove unused code in ConnectWithTimeout · cnblogs/EnyimMemcachedCore@051caec · GitHub
[go: up one dir, main page]

Skip to content

Commit 051caec

Browse files
committed
Remove unused code in ConnectWithTimeout
1 parent 3ae1ad6 commit 051caec

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Enyim.Caching/Memcached/PooledSocket.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ private bool ConnectWithTimeout(Socket socket, EndPoint endpoint, int timeout)
6060
bool connected = false;
6161
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true);
6262

63-
//Workaround for https://github.com/dotnet/corefx/issues/26840
64-
if (endpoint is DnsEndPoint)
65-
{
66-
var dnsEndPoint = (DnsEndPoint)endpoint;
67-
var address = Dns.GetHostAddresses(dnsEndPoint.Host).FirstOrDefault(ip =>
68-
ip.AddressFamily == AddressFamily.InterNetwork);
69-
if (address == null)
70-
throw new ArgumentException(String.Format("Could not resolve host '{0}'.", endpoint));
71-
endpoint = new IPEndPoint(address, dnsEndPoint.Port);
72-
}
73-
7463
//Learn from https://github.com/dotnet/corefx/blob/release/2.2/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs#L180
7564
var cts = new CancellationTokenSource();
7665
cts.CancelAfter(timeout);

0 commit comments

Comments
 (0)
0