mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
refactor: Return error from context (#140)
This commit is contained in:
parent
c04f859da9
commit
8d05efd2df
1 changed files with 1 additions and 2 deletions
|
|
@ -11,7 +11,6 @@ package engine
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"time"
|
||||
|
|
@ -113,7 +112,7 @@ func (e *gitOpsEngine) Sync(ctx context.Context,
|
|||
select {
|
||||
case <-ctx.Done():
|
||||
syncCtx.Terminate()
|
||||
return resources, errors.New("sync operation was terminated")
|
||||
return resources, ctx.Err()
|
||||
case <-time.After(operationRefreshTimeout):
|
||||
case <-resUpdated:
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue