We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 21174e8 + eb8d7c6 commit dba5ff1Copy full SHA for dba5ff1
opentelemetry-otlp/src/exporter/http/mod.rs
@@ -66,8 +66,11 @@ pub struct HttpConfig {
66
impl Default for HttpConfig {
67
fn default() -> Self {
68
#[cfg(feature = "reqwest-blocking-client")]
69
- let default_client =
70
- Some(Arc::new(reqwest::blocking::Client::new()) as Arc<dyn HttpClient>);
+ let default_client = std::thread::spawn(|| {
+ 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");
74
#[cfg(all(not(feature = "reqwest-blocking-client"), feature = "reqwest-client"))]
75
let default_client = Some(Arc::new(reqwest::Client::new()) as Arc<dyn HttpClient>);
76
#[cfg(all(
0 commit comments