Skip to content

Commit

Permalink
Use http_code instead of connect_time to detect curl errors (#2391)
Browse files Browse the repository at this point in the history
  • Loading branch information
PROFeNoM authored Nov 28, 2023
1 parent 3b04614 commit 92d074e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Integrations/Integrations/Curl/CurlIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function init()
foreach ($spans as $requestSpan) {
list($ch, $requestSpan) = $requestSpan;
$info = curl_getinfo($ch);
if ($info["connect_time"] <= 0) {
if (empty($info["http_code"])) {
$saveSpans = true;
if (!isset($error_trace)) {
$error_trace = \DDTrace\get_sanitized_exception_trace(new \Exception(), 1);
Expand Down

0 comments on commit 92d074e

Please sign in to comment.