Commit f225e38d authored by justcoding121's avatar justcoding121

fix test fail

parent 4bab38de
...@@ -154,8 +154,13 @@ namespace Titanium.Web.Proxy ...@@ -154,8 +154,13 @@ namespace Titanium.Web.Proxy
if (EnableTcpServerConnectionPrefetch) if (EnableTcpServerConnectionPrefetch)
{ {
//make sure the host can be resolved before creating the prefetch task IPAddress[] ipAddresses = null;
var ipAddresses = await Dns.GetHostAddressesAsync(connectArgs.HttpClient.Request.RequestUri.Host); try
{
//make sure the host can be resolved before creating the prefetch task
ipAddresses = await Dns.GetHostAddressesAsync(connectArgs.HttpClient.Request.RequestUri.Host);
}
catch (SocketException) { }
if (ipAddresses != null && ipAddresses.Length > 0) if (ipAddresses != null && ipAddresses.Length > 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment