This repository was archived by the owner on Jul 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/Titanium.Web.Proxy/Network/Tcp Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,10 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
293293 throw new Exception ( $ "Could not resolve the hostname { hostname } ") ;
294294 }
295295
296- session . TimeLine [ "Dns Resolved" ] = DateTime . Now ;
296+ if ( session != null )
297+ {
298+ session . TimeLine [ "Dns Resolved" ] = DateTime . Now ;
299+ }
297300
298301 var ipAddresses = ipHostEntry . AddressList ;
299302
@@ -313,7 +316,10 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
313316 }
314317 }
315318
316- session . TimeLine [ "Connection Established" ] = DateTime . Now ;
319+ if ( session != null )
320+ {
321+ session . TimeLine [ "Connection Established" ] = DateTime . Now ;
322+ }
317323
318324 await proxyServer . InvokeConnectionCreateEvent ( tcpClient , false ) ;
319325
@@ -370,7 +376,12 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
370376#if NETCOREAPP2_1
371377 negotiatedApplicationProtocol = sslStream . NegotiatedApplicationProtocol ;
372378#endif
373- session . TimeLine [ "HTTPS Established" ] = DateTime . Now ;
379+
380+ if ( session != null )
381+ {
382+ session . TimeLine [ "HTTPS Established" ] = DateTime . Now ;
383+ }
384+
374385 }
375386 }
376387 catch ( Exception )
You can’t perform that action at this time.
0 commit comments