Skip to content

Commit dba5ff1

Browse files
authored
Merge branch 'main' into chore/integration-test-2
2 parents 21174e8 + eb8d7c6 commit dba5ff1

File tree

1 file changed

+5
-2
lines changed
  • opentelemetry-otlp/src/exporter/http

1 file changed

+5
-2
lines changed

opentelemetry-otlp/src/exporter/http/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ pub struct HttpConfig {
6666
impl Default for HttpConfig {
6767
fn default() -> Self {
6868
#[cfg(feature = "reqwest-blocking-client")]
69-
let default_client =
70-
Some(Arc::new(reqwest::blocking::Client::new()) as Arc<dyn HttpClient>);
69+
let default_client = std::thread::spawn(|| {
70+
Some(Arc::new(reqwest::blocking::Client::new()) as Arc<dyn HttpClient>)
71+
})
72+
.join()
73+
.expect("creating reqwest::blocking::Client on a new thread not to fail");
7174
#[cfg(all(not(feature = "reqwest-blocking-client"), feature = "reqwest-client"))]
7275
let default_client = Some(Arc::new(reqwest::Client::new()) as Arc<dyn HttpClient>);
7376
#[cfg(all(

0 commit comments

Comments
 (0)