Skip to content

Commit

Permalink
Fix floating point excpetion in ssl connect metric
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiscigl committed Mar 11, 2024
1 parent 2a668ef commit 9eb1b20
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,14 +887,19 @@ std::shared_ptr<HttpResponse> CurlHttpClient::MakeRequest(const std::shared_ptr<
}

#if LIBCURL_VERSION_NUM >= 0x073700 // 7.55.0
ret = curl_easy_getinfo(connectionHandle, CURLINFO_APPCONNECT_TIME_T, &timep); // Ssl Latency
curl_off_t AppConnectT;
ret = curl_easy_getinfo(connectionHandle, CURLINFO_APPCONNECT_TIME_T, &AppConnectT); // Ssl Latency
if (ret == CURLE_OK)
{
request->AddRequestMetric(GetHttpClientMetricNameByType(HttpClientMetricsType::SslLatency), AppConnectT * 1000);
}
#else
ret = curl_easy_getinfo(connectionHandle, CURLINFO_APPCONNECT_TIME, &timep); // Ssl Latency
#endif
if (ret == CURLE_OK)
{
request->AddRequestMetric(GetHttpClientMetricNameByType(HttpClientMetricsType::SslLatency), static_cast<int64_t>(timep * 1000));
}
#endif

curl_off_t speed;
#if LIBCURL_VERSION_NUM >= 0x073700 // 7.55.0
Expand Down

0 comments on commit 9eb1b20

Please sign in to comment.