Skip to content

Commit

Permalink
fix(userspace/libsinsp): set a timeout on the curl handle when retrie…
Browse files Browse the repository at this point in the history
…ving docker info.

Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Aug 28, 2023
1 parent 586cb1b commit b96bde3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ docker_connection::docker_response docker_connection::get_docker(const docker_lo
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, docker_curl_write_callback);
curl_easy_setopt(curl, CURLOPT_UNIX_SOCKET_PATH, docker_path.c_str());
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 5);

std::string url = "http://localhost" + m_api_version + req_url;

Expand Down

0 comments on commit b96bde3

Please sign in to comment.