Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
curl: handle timeout
Baptiste Daroussin committed 2 years ago
commit 722a0bd6fdcd621a239d7d62f3a54a2c58709b71
parent c6c6c75
1 file changed +2 -0
modified libpkg/fetch_libcurl.c
@@ -139,6 +139,8 @@ curl_fetch(struct pkg_repo *repo, int dest, const char *url, off_t sz, off_t off
	curl_easy_setopt(cl, CURLOPT_TIMECONDITION, (long)CURL_TIMECOND_IFMODSINCE);
	curl_easy_setopt(cl, CURLOPT_HEADERFUNCTION, curl_parseheader_cb);
	curl_easy_setopt(cl, CURLOPT_HEADERDATA, &data);
+
	if (repo->fetcher->timeout > 0)
+
		curl_easy_setopt(cl, CURLOPT_TIMEOUT, repo->fetcher->timeout);

	//curl_easy_setopt(cl, CURLOPT_MAXFILESIZE_LARGE, *sz);
	/* compat with libfetch */