mirror of
https://github.com/NixOS/nix
synced 2024-09-19 23:03:53 -04:00
Warn if the download buffer is full
(cherry picked from commit f6a9a71b38
)
This commit is contained in:
parent
78046450ab
commit
c3e907af7d
|
@ -859,6 +859,8 @@ void FileTransfer::download(
|
||||||
sender.) */
|
sender.) */
|
||||||
if (state->data.size() > fileTransferSettings.downloadBufferSize) {
|
if (state->data.size() > fileTransferSettings.downloadBufferSize) {
|
||||||
debug("download buffer is full; going to sleep");
|
debug("download buffer is full; going to sleep");
|
||||||
|
static bool haveWarned = false;
|
||||||
|
warnOnce(haveWarned, "download buffer is full; consider increasing the 'download-buffer-size' setting");
|
||||||
state.wait_for(state->request, std::chrono::seconds(10));
|
state.wait_for(state->request, std::chrono::seconds(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue