mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 22:32:26 +00:00
Merge pull request #7793 from layus/interrupt_downloads
Check interrupts even when download stalled
This commit is contained in:
commit
a4a5d828e2
@ -829,7 +829,7 @@ void FileTransfer::download(FileTransferRequest && request, Sink & sink)
|
||||
{
|
||||
auto state(_state->lock());
|
||||
|
||||
while (state->data.empty()) {
|
||||
if (state->data.empty()) {
|
||||
|
||||
if (state->quit) {
|
||||
if (state->exc) std::rethrow_exception(state->exc);
|
||||
@ -837,6 +837,8 @@ void FileTransfer::download(FileTransferRequest && request, Sink & sink)
|
||||
}
|
||||
|
||||
state.wait(state->avail);
|
||||
|
||||
if (state->data.empty()) continue;
|
||||
}
|
||||
|
||||
chunk = std::move(state->data);
|
||||
|
Loading…
Reference in New Issue
Block a user