Skip to content

Commit

Permalink
Don't return error when attempt of sending delta fails to allow next …
Browse files Browse the repository at this point in the history
…attempt

func ExponentialBackoffWithContext(ctx context.Context, backoff Backoff, condition ConditionWithContextFunc) error
repeats a condition check with exponential backoff.
It immediately returns an error if the condition returns an error,
the context is cancelled or hits the deadline,
or if the maximum attempts defined in backoff is exceeded (ErrWaitTimeout).
  • Loading branch information
kasia-kujawa committed Jan 16, 2025
1 parent 908079e commit 49d672d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/castai/castai.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func (c *client) SendDelta(ctx context.Context, clusterID string, delta *Delta)
resp, err = c.deltaHTTPClient.Do(req)
if err != nil {
log.Warnf("failed sending delta request: %v", err)
return false, fmt.Errorf("sending delta request: %w", err)
return false, nil
}
return true, nil
})
Expand Down

0 comments on commit 49d672d

Please sign in to comment.