Skip to content

Commit

Permalink
Update HttpSink.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Takuka0311 authored Jan 13, 2025
1 parent 3e83e53 commit 95bb07a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/runner/sink/http/HttpSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ bool HttpSink::AddRequestToClient(unique_ptr<HttpSinkRequest>&& request) {

request->mPrivateData = headers;
curl_easy_setopt(curl, CURLOPT_PRIVATE, request.get());
request->mLastSendTime = chrono::system_clock::now();

auto res = curl_multi_add_handle(mClient, curl);
if (res != CURLM_OK) {
Expand Down Expand Up @@ -291,6 +292,7 @@ void HttpSink::HandleCompletedRequests(int& runningHandlers) {
++request->mTryCnt;
AddRequestToClient(unique_ptr<HttpSinkRequest>(request));
++runningHandlers;
mSendingItemsTotal->Add(1);
requestReused = true;
} else {
auto errMsg = curl_easy_strerror(msg->data.result);
Expand Down

0 comments on commit 95bb07a

Please sign in to comment.