Skip to content

Commit

Permalink
Add explicit exponential backoff policy
Browse files Browse the repository at this point in the history
  • Loading branch information
evenh committed Apr 27, 2019
1 parent 2ef117f commit b3329ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ func StartClient(config *config.ClientConfig, userAgent string) {
log.Infof("Configuring connection to %s for gRPC operations", config.GetDialAddr())

// Configure connection
conn, err := grpc.Dial(config.GetDialAddr(), grpc.WithInsecure(), grpc.WithUserAgent(userAgent+";")) // TODO: Not run insecure
// TODO: Not run insecure
conn, err := grpc.Dial(
config.GetDialAddr(),
grpc.WithBackoffConfig(grpc.DefaultBackoffConfig),
grpc.WithInsecure(),
grpc.WithUserAgent(userAgent+";"),
)

if err != nil {
log.Warnf("Could not configure connection to host: %v", err)
Expand Down

0 comments on commit b3329ff

Please sign in to comment.