Skip to content

Commit

Permalink
chore: optimize dfget log (#3034)
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Ma <majinjing3@gmail.com>
  • Loading branch information
jim3ma authored Jan 19, 2024
1 parent 31f0155 commit 2f04697
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/dfget/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ func checkAndSpawnDaemon(dfgetLockPath, daemonSockPath string) (client.V1, error
for {
select {
case <-timeout:
return nil, errors.New("the daemon is unhealthy")
return nil, errors.Join(errors.New("the daemon is unhealthy"), err)
case <-tick.C:
if err = dfdaemonClient.CheckHealth(context.Background()); err != nil {
logger.Debugf("check health failed: %s", err)
continue
}
return dfdaemonClient, nil
Expand Down

0 comments on commit 2f04697

Please sign in to comment.