Skip to content

Commit

Permalink
restore keep-alive setting
Browse files Browse the repository at this point in the history
  • Loading branch information
HustXrb authored and jobs committed Jun 14, 2016
1 parent dc37086 commit 45862c4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions hustdb/sync/module/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ extern "C"

curl_easy_setopt (http->curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt (http->curl, CURLOPT_AUTOREFERER, 1);
curl_easy_setopt (http->curl, CURLOPT_MAXREDIRS, 11);
curl_easy_setopt (http->curl, CURLOPT_MAXCONNECTS, 11);
curl_easy_setopt (http->curl, CURLOPT_MAXREDIRS, 10);
curl_easy_setopt (http->curl, CURLOPT_MAXCONNECTS, 100);
curl_easy_setopt (http->curl, CURLOPT_CLOSEPOLICY, CURLCLOSEPOLICY_LEAST_RECENTLY_USED);

curl_easy_setopt (http->curl, CURLOPT_FILETIME, 1);
Expand Down Expand Up @@ -312,6 +312,12 @@ extern "C"
return false;
}
}

r = curl_easy_setopt (http->curl, CURLOPT_POST, 1);
if ( unlikely (CURLE_OK != r) )
{
return false;
}

r = curl_easy_setopt (http->curl, CURLOPT_POSTFIELDS, fields);
if ( unlikely (CURLE_OK != r) )
Expand Down

0 comments on commit 45862c4

Please sign in to comment.