dhcp4: increase number of unhealthy cycles
This commit is contained in:
parent
575a14c394
commit
a5a012dd96
@ -53,7 +53,7 @@ func healthy() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
ctx, canc := context.WithTimeout(context.Background(), 5*time.Second)
|
ctx, canc := context.WithTimeout(context.Background(), 30*time.Second)
|
||||||
defer canc()
|
defer canc()
|
||||||
req = req.WithContext(ctx)
|
req = req.WithContext(ctx)
|
||||||
resp, err := http.DefaultClient.Do(req)
|
resp, err := http.DefaultClient.Do(req)
|
||||||
@ -179,7 +179,7 @@ ObtainOrRenew:
|
|||||||
} else {
|
} else {
|
||||||
unhealthyCycles++
|
unhealthyCycles++
|
||||||
log.Printf("router unhealthy (cycle %d of 5): %v", unhealthyCycles, err)
|
log.Printf("router unhealthy (cycle %d of 5): %v", unhealthyCycles, err)
|
||||||
if unhealthyCycles < 5 {
|
if unhealthyCycles < 20 {
|
||||||
continue // wait until unhealthy for longer
|
continue // wait until unhealthy for longer
|
||||||
}
|
}
|
||||||
// fallthrough
|
// fallthrough
|
||||||
|
Loading…
x
Reference in New Issue
Block a user