title: curl_easy_perform() in libcurl returns code 2
body: <p>I'm using curl_easy_perform() in c++ to make http calls. I do the following initialization</p>
  
  <pre><code>curl = curl_easy_init();
  curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:8080/lecture/add_sensor_data");
  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "course=course1&amp;session=session1&amp;task=task1&amp;acceleration=2");
  </code></pre>
  
  <p>and I run <code>res = curl_easy_perform(curl);</code> in a timer loop(10 times a second). I noticed that for the first 700 http calls curl_easy_perform would return a 0 and then it starts to return 2(CURLE_FAILED_INIT) frequently. I'm trying to fix this issue so that curl_easy_perform returns only a 0. Any input would be helpful.</p>
  
  <p>I'm running a web service locally on my machine and making the http calls using curl from c++ application.</p>