forked from lix-project/lix
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());
|
auto state(_state->lock());
|
||||||
|
|
||||||
while (state->data.empty()) {
|
|
||||||
|
|
||||||
if (state->quit) {
|
if (state->quit) {
|
||||||
if (state->exc) std::rethrow_exception(state->exc);
|
if (state->exc) std::rethrow_exception(state->exc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
state.wait(state->avail);
|
state.wait(state->avail);
|
||||||
}
|
|
||||||
|
if (state->data.empty()) continue;
|
||||||
|
|
||||||
chunk = std::move(state->data);
|
chunk = std::move(state->data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue