mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 16:02:43 +01:00
curlFileTransfer::workerThreadEntry Only call quit if we need to.
This commit is contained in:
parent
1f65b08d94
commit
86fb5b24a9
1 changed files with 5 additions and 1 deletions
|
|
@ -781,14 +781,18 @@ struct curlFileTransfer : public FileTransfer
|
|||
|
||||
void workerThreadEntry()
|
||||
{
|
||||
// Unwinding or because someone called `quit`.
|
||||
bool normalExit = true;
|
||||
try {
|
||||
workerThreadMain();
|
||||
} catch (nix::Interrupted & e) {
|
||||
normalExit = false;
|
||||
} catch (std::exception & e) {
|
||||
printError("unexpected error in download thread: %s", e.what());
|
||||
normalExit = false;
|
||||
}
|
||||
|
||||
{
|
||||
if (!normalExit) {
|
||||
auto state(state_.lock());
|
||||
state->quit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue