1
1
Fork 0
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:
John Ericson 2025-09-29 16:43:45 -04:00
parent 1f65b08d94
commit 86fb5b24a9

View file

@ -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();
}