Check interupts even when download stalled
This commit is contained in:
parent
e4a2a5c074
commit
78fea899e0
|
@ -828,15 +828,14 @@ void FileTransfer::download(FileTransferRequest && request, Sink & sink)
|
|||
{
|
||||
auto state(_state->lock());
|
||||
|
||||
while (state->data.empty()) {
|
||||
|
||||
if (state->quit) {
|
||||
if (state->exc) std::rethrow_exception(state->exc);
|
||||
return;
|
||||
}
|
||||
|
||||
state.wait(state->avail);
|
||||
}
|
||||
|
||||
if (state->data.empty()) continue;
|
||||
|
||||
chunk = std::move(state->data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue