Skip to content

Commit

Permalink
Review notes #1 - cdmihai
Browse files Browse the repository at this point in the history
- remaing local variable
  • Loading branch information
rokonec committed Aug 5, 2021
1 parent 04a1a67 commit 3a4dc9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Build/BackEnd/BuildManager/BuildManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1563,26 +1563,26 @@ private void HandleSubmissionException(BuildSubmission submission, Exception ex)
}
}

bool setFaultedResult;
bool submissionNeedsCompletion;
lock (_syncLock)
{
// BuildRequest may be null if the submission fails early on.
setFaultedResult = submission.BuildRequest != null;
if (setFaultedResult)
submissionNeedsCompletion = submission.BuildRequest != null;
if (submissionNeedsCompletion)
{
var result = new BuildResult(submission.BuildRequest, ex);
submission.CompleteResults(result);
}
}

if (setFaultedResult)
if (submissionNeedsCompletion)
{
WaitForAllLoggingServiceEventsToBeProcessed();
}

lock (_syncLock)
{
if (setFaultedResult)
if (submissionNeedsCompletion)
{
submission.CompleteLogging();
}
Expand Down

0 comments on commit 3a4dc9f

Please sign in to comment.