File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ private ITransport CreateTransport()
23
23
_options . LogDebug ( "Creating transport." ) ;
24
24
25
25
// Start from either the transport given on options, or create a new HTTP transport.
26
- var transport = _options . Transport ?? CreateHttpTransport ( ) ;
26
+ var transport = _options . Transport ?? new LazyHttpTransport ( _options ) ;
27
27
28
28
// When a cache directory path is given, wrap the transport in a caching transport.
29
29
if ( ! string . IsNullOrWhiteSpace ( _options . CacheDirectoryPath ) )
@@ -75,18 +75,6 @@ You can set a different environment via SENTRY_ENVIRONMENT env var or programati
75
75
return transport ;
76
76
}
77
77
78
- private LazyHttpTransport CreateHttpTransport ( )
79
- {
80
- if ( _options . SentryHttpClientFactory is not null )
81
- {
82
- _options . LogDebug (
83
- "Using ISentryHttpClientFactory set through options: {0}." ,
84
- _options . SentryHttpClientFactory . GetType ( ) . Name ) ;
85
- }
86
-
87
- return new LazyHttpTransport ( _options ) ;
88
- }
89
-
90
78
public IBackgroundWorker CreateBackgroundWorker ( )
91
79
{
92
80
if ( _options . BackgroundWorker is { } worker )
Original file line number Diff line number Diff line change @@ -222,6 +222,13 @@ internal IEnumerable<ISdkIntegration> Integrations
222
222
223
223
internal HttpClient GetHttpClient ( )
224
224
{
225
+ if ( SentryHttpClientFactory is not null )
226
+ {
227
+ DiagnosticLogger ? . LogDebug (
228
+ "Using ISentryHttpClientFactory set through options: {0}." ,
229
+ SentryHttpClientFactory . GetType ( ) . Name ) ;
230
+ }
231
+
225
232
var factory = SentryHttpClientFactory ?? new DefaultSentryHttpClientFactory ( ) ;
226
233
return factory . Create ( this ) ;
227
234
}
You can’t perform that action at this time.
0 commit comments