Skip to content

Commit e6b0772

Browse files
authored
Update driver.go
1 parent 714ab17 commit e6b0772

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

driver.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ type hetznerDriver struct {
2828
}
2929

3030
func (hd *hetznerDriver) checkBackoff() error {
31-
if time.Now().Before(hd.nextTry) {
32-
return fmt.Errorf("last failure too recent; waiting a bit before retrying")
33-
}
34-
return nil
31+
now := time.Now()
32+
if now.Before(hd.nextTry) {
33+
waitDuration := time.Until(hd.nextTry)
34+
return fmt.Errorf("last failure too recent; failed %d times in a row before this; retry after %s", hd.failuresInARow, waitDuration)
35+
}
36+
return nil
3537
}
3638

3739
func (hd *hetznerDriver) handleBackoff(err error) {

0 commit comments

Comments
 (0)