aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/build/derivation-goal.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index 96140e10b..5de159b2d 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -127,7 +127,11 @@ Goal::WorkResult DerivationGoal::timedOut(Error && ex)
kj::Promise<Result<Goal::WorkResult>> DerivationGoal::workImpl() noexcept
{
- return useDerivation ? getDerivation() : haveDerivation();
+ return (useDerivation ? getDerivation() : haveDerivation()).attach(kj::defer([this] {
+ act.reset();
+ actLock.reset();
+ builderActivities.clear();
+ }));
}
bool DerivationGoal::addWantedOutputs(const OutputsSpec & outputs)