mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-10-03 15:29:29 +00:00
curl: Stop using CURLOPT_PIPEWAIT flag temporarily
We're seeing a problem in current curl when using the flag CURLOPT_PIPEWAIT and trying to download a file from an unexistent or unreachable server. Easiest way to reproduce that on swupd is to disable your while you are in the download phase of any swupd command. Without this patch swupd will hangs and wont timeout. The downside of removing this flag is that curl will prefer to open more connections instead of waiting to check if it can multiplex. So it's a good thing to have this enabled back in the future Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
+5
-4
@@ -757,10 +757,11 @@ CURLcode swupd_curl_set_basic_options(CURL *curl, const char *url, bool fail_on_
|
||||
goto exit;
|
||||
}
|
||||
|
||||
curl_ret = curl_easy_setopt(curl, CURLOPT_PIPEWAIT, 1);
|
||||
if (curl_ret != CURLE_OK && curl_ret != CURLE_UNKNOWN_OPTION) {
|
||||
goto exit;
|
||||
}
|
||||
//TODO: Introduce code back on bug is fixed on curl
|
||||
//curl_ret = curl_easy_setopt(curl, CURLOPT_PIPEWAIT, 1);
|
||||
//if (curl_ret != CURLE_OK && curl_ret != CURLE_UNKNOWN_OPTION) {
|
||||
// goto exit;
|
||||
//}
|
||||
|
||||
curl_ret = curl_easy_setopt(curl, CURLOPT_USERAGENT, PACKAGE "/" VERSION);
|
||||
if (curl_ret != CURLE_OK && curl_ret != CURLE_UNKNOWN_OPTION) {
|
||||
|
||||
Reference in New Issue
Block a user