Commit bf983616 authored by justcoding121's avatar justcoding121

check for null

parent fb33defa
......@@ -293,7 +293,10 @@ namespace Titanium.Web.Proxy.Network.Tcp
throw new Exception($"Could not resolve the hostname {hostname}");
}
if (session != null)
{
session.TimeLine["Dns Resolved"] = DateTime.Now;
}
var ipAddresses = ipHostEntry.AddressList;
......@@ -313,7 +316,10 @@ namespace Titanium.Web.Proxy.Network.Tcp
}
}
if (session != null)
{
session.TimeLine["Connection Established"] = DateTime.Now;
}
await proxyServer.InvokeConnectionCreateEvent(tcpClient, false);
......@@ -370,8 +376,13 @@ namespace Titanium.Web.Proxy.Network.Tcp
#if NETCOREAPP2_1
negotiatedApplicationProtocol = sslStream.NegotiatedApplicationProtocol;
#endif
if (session != null)
{
session.TimeLine["HTTPS Established"] = DateTime.Now;
}
}
}
catch (Exception)
{
......
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