Skip to content

Commit fe50476

Browse files
feat: extend ExponentialBackOff in cluster-proxy service (#672)
1 parent 77883ef commit fe50476

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/clusterproxy/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (c *Client) Run(ctx context.Context) error {
7777

7878
eb := backoff.NewExponentialBackOff()
7979
eb.InitialInterval = 1 * time.Second
80-
eb.MaxInterval = 30 * time.Second
80+
eb.MaxInterval = 5 * time.Minute
8181

8282
op := func() (struct{}, error) {
8383
err := c.subscribe(ctx)
@@ -90,6 +90,7 @@ func (c *Client) Run(ctx context.Context) error {
9090

9191
_, err := backoff.Retry(ctx, op,
9292
backoff.WithBackOff(eb),
93+
backoff.WithMaxElapsedTime(0),
9394
)
9495
return err
9596
}

0 commit comments

Comments
 (0)