You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.150
Former-commit-id: 73e3bb1e96dd09dc931c1dfe559d2c7f7b8b02c7
This commit is contained in:
parent
02ac915603
commit
b95516a3dd
@ -345,25 +345,25 @@ namespace System.Net
|
||||
lock (hostE) {
|
||||
string uriHost = uri.Host;
|
||||
|
||||
if (host == null) {
|
||||
// Cannot do DNS resolution on literal IP addresses
|
||||
if (uri.HostNameType == UriHostNameType.IPv6 || uri.HostNameType == UriHostNameType.IPv4) {
|
||||
|
||||
if (uri.HostNameType == UriHostNameType.IPv6) {
|
||||
// Remove square brackets
|
||||
uriHost = uriHost.Substring (1, uriHost.Length - 2);
|
||||
}
|
||||
|
||||
// Creates IPHostEntry
|
||||
host = new IPHostEntry();
|
||||
host.AddressList = new IPAddress[] { IPAddress.Parse (uriHost) };
|
||||
// Cannot do DNS resolution on literal IP addresses
|
||||
if (uri.HostNameType == UriHostNameType.IPv6 || uri.HostNameType == UriHostNameType.IPv4) {
|
||||
if (host != null)
|
||||
return host;
|
||||
|
||||
if (uri.HostNameType == UriHostNameType.IPv6) {
|
||||
// Remove square brackets
|
||||
uriHost = uriHost.Substring (1, uriHost.Length - 2);
|
||||
}
|
||||
} else {
|
||||
if (!HasTimedOut)
|
||||
return host;
|
||||
|
||||
// Creates IPHostEntry
|
||||
host = new IPHostEntry();
|
||||
host.AddressList = new IPAddress[] { IPAddress.Parse (uriHost) };
|
||||
return host;
|
||||
}
|
||||
|
||||
if (!HasTimedOut)
|
||||
return host;
|
||||
|
||||
lastDnsResolve = DateTime.UtcNow;
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user