From 4860aa99c947c2b9e54f3802f70106b314ffe5e8 Mon Sep 17 00:00:00 2001 From: wxl374 Date: Fri, 11 Mar 2022 14:45:01 +0800 Subject: [PATCH] fix: use CURLOPT_TIMEOUT_MS to config OtlpHttpExporter's timeout instead of CURLOPT_TIMEOUT --- .../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 5aaaa0a0e5..09cf8c7c2a 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_)