]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: set up curl with CURL_NOSIGNAL
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 12 Mar 2013 19:56:01 +0000 (12:56 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Wed, 13 Mar 2013 17:45:07 +0000 (10:45 -0700)
Fixes: #4425
Backport: bobtail
Apparently, libcurl needs that in order to be thread safe. Side
effect is that if libcurl is not compiled with c-ares support,
domain name lookups are not going to time out.
Issue affected keystone.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/rgw/rgw_http_client.cc

index 4c7b99c17c332b1b430bbcc83657279265acb2fc..f9e5a8260fc7dc24f347dbce3eb5530170d1edac 100644 (file)
@@ -54,6 +54,7 @@ int RGWHTTPClient::process(const string& url)
 
   curl_easy_setopt(curl_handle, CURLOPT_URL, url.c_str());
   curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
+  curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1L);
   curl_easy_setopt(curl_handle, CURLOPT_HEADERFUNCTION, read_http_header);
   curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER, (void *)this);
   curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, read_http_data);