Skip to content

Commit

Permalink
fix: retry on Hello failures
Browse files Browse the repository at this point in the history
Client shouldn't go into Watch mode if Hello failed.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Sep 30, 2021
1 parent ab9c7c9 commit ee4b2a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ func (client *Client) Run(ctx context.Context, logger *zap.Logger, notifyCh chan
newEndpoint, err := client.sendHello(ctx, discoveryClient)
if err != nil {
logger.Error("hello failed", zap.Error(err), zap.String("endpoint", client.options.Endpoint))

// retry hello request until it succeeds
continue
}

if newEndpoint != "" {
Expand Down

0 comments on commit ee4b2a4

Please sign in to comment.