Skip to content

Commit

Permalink
Move reference to handleStepComplete() to a better spot
Browse files Browse the repository at this point in the history
  • Loading branch information
webbnh committed Jul 29, 2024
1 parent c4cea4d commit da8683b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions atp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func (c *client) Execute(
// Handle signals to the step
if receivedSignals != nil {
c.wg.Add(1)
defer c.handleStepComplete(stepData.RunID)
go func() {
defer c.wg.Done()
c.executeWriteLoop(stepData.RunID, receivedSignals)
Expand All @@ -203,9 +204,6 @@ func (c *client) Execute(
}
c.logger.Debugf("Step '%s' started, waiting for response...", stepData.ID)

if receivedSignals != nil {
defer c.handleStepComplete(stepData.RunID)
}
return c.getResult(stepData, cborReader)
}

Expand Down

0 comments on commit da8683b

Please sign in to comment.