From 4a7200b3658517c80412e0c7edfd15208873cf47 Mon Sep 17 00:00:00 2001 From: wxl374 Date: Sat, 12 Mar 2022 02:43:43 +0800 Subject: [PATCH] fix: use CURLOPT_TIMEOUT_MS to config OtlpHttpExporter's timeout instead of CURLOPT_TIMEOUT (#1261) --- .../opentelemetry/ext/http/client/curl/http_operation_curl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h b/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h index 5aaaa0a0e55..09cf8c7c2a3 100644 --- a/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h +++ b/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h @@ -186,7 +186,7 @@ class HttpOperation // Perform initial connect, handling the timeout if needed curl_easy_setopt(curl_, CURLOPT_CONNECT_ONLY, 1L); - curl_easy_setopt(curl_, CURLOPT_TIMEOUT, http_conn_timeout_.count() / 1000); + curl_easy_setopt(curl_, CURLOPT_TIMEOUT_MS, http_conn_timeout_.count()); DispatchEvent(opentelemetry::ext::http::client::SessionState::Connecting); res_ = curl_easy_perform(curl_); if (CURLE_OK != res_)