mirror of
https://github.com/NixOS/nix
synced 2025-06-28 05:21:16 +02:00
add a nix.conf option to set a download speed limit
This commit is contained in:
parent
7aa36ae796
commit
0d2bf7acf9
2 changed files with 10 additions and 0 deletions
|
@ -308,6 +308,9 @@ struct curlFileTransfer : public FileTransfer
|
|||
|
||||
curl_easy_setopt(req, CURLOPT_HTTPHEADER, requestHeaders);
|
||||
|
||||
if (settings.downloadSpeed.get() > 0)
|
||||
curl_easy_setopt(req, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t) (settings.downloadSpeed.get() * 1024));
|
||||
|
||||
if (request.head)
|
||||
curl_easy_setopt(req, CURLOPT_NOBODY, 1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue