Skip to content

Commit

Permalink
Fix: Don't update endpoint tasks in terminal status (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi authored Dec 20, 2024
1 parent 09688e6 commit 3fcfeca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/abstractions/endpoint/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ func (t *EndpointTask) Cancel(ctx context.Context, reason types.TaskCancellation
return err
}

// Don't update tasks that are already in a terminal state
if task.Status.IsCompleted() {
return nil
}

switch reason {
case types.TaskExpired:
task.Status = types.TaskStatusExpired
Expand Down

0 comments on commit 3fcfeca

Please sign in to comment.