Skip to content

Commit

Permalink
Merge pull request #36 from depot/fix-error
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie authored Jun 26, 2022
2 parents 09603c9 + 2e2d62d commit e5f3551
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,16 @@ func (b *Builder) Acquire(l progress.Logger) (string, error) {
sub.Log(2, []byte("Still waiting for builder to start...\n"))
}

time.Sleep(time.Duration(resp.PollSeconds) * time.Second)
if resp != nil {
time.Sleep(time.Duration(resp.PollSeconds) * time.Second)
} else {
time.Sleep(time.Duration(1) * time.Second)
}

resp, err = b.depot.GetBuilder(b.BuildID, b.Platform)
if err != nil {
sub.Log(2, []byte(err.Error()+"\n"))
}
count += 1
if count > 30 {
return errors.New("Unable to acquire builder connection")
Expand Down

0 comments on commit e5f3551

Please sign in to comment.