Skip to content

Commit

Permalink
only write error log line on error
Browse files Browse the repository at this point in the history
  • Loading branch information
chelseakomlo committed May 7, 2018
1 parent 496b5cc commit 321b077
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions command/agent/retry_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ func (r *retryJoiner) RetryJoin(config *Config) {
return
}

r.logger.Printf("[WARN] agent: Join failed: %v, retrying in %v", err,
config.Server.RetryInterval)
if err != nil {
r.logger.Printf("[WARN] agent: Join failed: %v, retrying in %v", err,
config.Server.RetryInterval)
}
time.Sleep(config.Server.retryInterval)
}
}

0 comments on commit 321b077

Please sign in to comment.