From e6ad8e844029ac340dc3f2a4693c3f4a1d645226 Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Fri, 10 Feb 2023 00:57:56 +0100 Subject: nit: cleaner diff --- src/libstore/filetransfer.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libstore/filetransfer.cc') diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc index a9a5d1389..3ca40db72 100644 --- a/src/libstore/filetransfer.cc +++ b/src/libstore/filetransfer.cc @@ -829,6 +829,7 @@ void FileTransfer::download(FileTransferRequest && request, Sink & sink) auto state(_state->lock()); if (state->data.empty()) { + if (state->quit) { if (state->exc) std::rethrow_exception(state->exc); return; @@ -840,6 +841,7 @@ void FileTransfer::download(FileTransferRequest && request, Sink & sink) } chunk = std::move(state->data); + state->request.notify_one(); } -- cgit v1.2.3