Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions 5 src/net/CurlHttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ static CURL* getCurlHandle(const CurlHttpClient *c_) {
if (!curl) {
throw std::runtime_error("curl_easy_init() failed");
}
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 20);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, c->_timeout);
c->curlHandles[id] = curl;
return curl;
}
Expand All @@ -45,6 +43,9 @@ static std::size_t curlWriteString(char* ptr, std::size_t size, std::size_t nmem
std::string CurlHttpClient::makeRequest(const Url& url, const std::vector<HttpReqArg>& args) const {
CURL* curl = getCurlHandle(this);

curl_easy_reset(curl);
ammarfaizi2 marked this conversation as resolved.
Show resolved Hide resolved
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 20);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, _timeout);
std::string u = url.protocol + "://" + url.host + url.path;
if (args.empty()) {
u += "?" + url.query;
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.