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
293
293
throw new Exception ( $ "Could not resolve the hostname { hostname } ") ;
294
294
}
295
295
296
- session . TimeLine [ "Dns Resolved" ] = DateTime . Now ;
296
+ if ( session != null )
297
+ {
298
+ session . TimeLine [ "Dns Resolved" ] = DateTime . Now ;
299
+ }
297
300
298
301
var ipAddresses = ipHostEntry . AddressList ;
299
302
@@ -313,7 +316,10 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
313
316
}
314
317
}
315
318
316
- session . TimeLine [ "Connection Established" ] = DateTime . Now ;
319
+ if ( session != null )
320
+ {
321
+ session . TimeLine [ "Connection Established" ] = DateTime . Now ;
322
+ }
317
323
318
324
await proxyServer . InvokeConnectionCreateEvent ( tcpClient , false ) ;
319
325
@@ -370,7 +376,12 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
370
376
#if NETCOREAPP2_1
371
377
negotiatedApplicationProtocol = sslStream . NegotiatedApplicationProtocol ;
372
378
#endif
373
- session . TimeLine [ "HTTPS Established" ] = DateTime . Now ;
379
+
380
+ if ( session != null )
381
+ {
382
+ session . TimeLine [ "HTTPS Established" ] = DateTime . Now ;
383
+ }
384
+
374
385
}
375
386
}
376
387
catch ( Exception )
You can’t perform that action at this time.
0 commit comments