Skip to content

Commit

Permalink
Merge pull request #2242 from marta-lokhova/conditional_work_fixes
Browse files Browse the repository at this point in the history
Conditional work fixes

Reviewed-by: MonsieurNicolas
  • Loading branch information
latobarita committed Aug 21, 2019
2 parents 51b89d2 + b0a4bdb commit 67c1fdd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/catchup/ApplyCheckpointWork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,4 +293,15 @@ ApplyCheckpointWork::onRun()
return State::WORK_FAILURE;
}
}

void
ApplyCheckpointWork::onSuccess()
{
if (mFilesOpen)
{
mHdrIn.close();
mTxIn.close();
mFilesOpen = false;
}
}
}
1 change: 1 addition & 0 deletions src/catchup/ApplyCheckpointWork.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ class ApplyCheckpointWork : public BasicWork
{
return true;
};
void onSuccess() override;
};
}
1 change: 1 addition & 0 deletions src/work/ConditionalWork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ ConditionalWork::onRun()
"Condition for {} is satisfied: starting work", getName());
mConditionedWork->startWork(wakeSelfUpCallback());
mWorkStarted = true;
mCondition = nullptr;
return this->onRun();
}
}
Expand Down

0 comments on commit 67c1fdd

Please sign in to comment.