avoid libcurl crashes

This commit is contained in:
Konstantin Käfer
2014-03-06 14:34:27 +01:00
parent 420cb58a5d
commit 67fc163404

View File

@@ -78,6 +78,11 @@ void Request::request(void *ptr) {
CURL *curl = nullptr;
if ((curl = pthread_getspecific(key)) == nullptr) {
curl = curl_easy_init();
// stopgap to avoid libcurl crashes:
// see https://stackoverflow.com/q/9191668
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
pthread_setspecific(key, curl);
}