mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
Merge pull request #7793 from layus/interrupt_downloads
Check interrupts even when download stalled
This commit is contained in:
commit
a4a5d828e2
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue