Skip to content

Commit

Permalink
Address nit and minor logic flaw
Browse files Browse the repository at this point in the history
  • Loading branch information
chusitoo committed Jan 17, 2025
1 parent d3c52fe commit 63d7d7d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ext/src/http/client/curl/http_client_curl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ bool HttpClient::doRemoveSessions()

bool HttpClient::doRetrySessions(bool report_all)
{
#ifdef ENABLE_OTLP_RETRY_PREVIEW
const auto now = std::chrono::system_clock::now();
auto has_data = false;

Expand Down Expand Up @@ -863,7 +864,11 @@ bool HttpClient::doRetrySessions(bool report_all)
}
}

return report_all ? !pending_to_retry_sessions_.empty() : has_data;
report_all = report_all && !pending_to_retry_sessions_.empty();
return has_data || report_all;
#else
return false;
#endif // ENABLE_OTLP_RETRY_PREVIEW
}

void HttpClient::resetMultiHandle()
Expand Down

0 comments on commit 63d7d7d

Please sign in to comment.