Skip to content

Commit

Permalink
Merge pull request insomniacslk#483 from abrender/patch-1
Browse files Browse the repository at this point in the history
Return error from RequestNetbootv4
  • Loading branch information
pmazzini committed Nov 28, 2022
2 parents 5308ebe + 68ec6da commit f26e6d7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions netboot/netboot.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ func RequestNetbootv6(ifname string, timeout time.Duration, retries int, modifie
if err != nil {
log.Printf("Client.Exchange failed: %v", err)
if i >= retries {
// don't wait at the end of the last attempt
return nil, fmt.Errorf("netboot failed after %d attempts: %v", retries+1, err)
}
log.Printf("sleeping %v before retrying", delay)
Expand Down Expand Up @@ -80,8 +79,7 @@ func RequestNetbootv4(ifname string, timeout time.Duration, retries int, modifie
log.Printf("Client.Exchange failed: %v", err)
log.Printf("sleeping %v before retrying", delay)
if i >= retries {
// don't wait at the end of the last attempt
break
return nil, fmt.Errorf("netboot failed after %d attempts: %v", retries+1, err)
}
sleeper(delay)
// TODO add random splay
Expand Down

0 comments on commit f26e6d7

Please sign in to comment.