dhcp4: close healthiness checking connection
This commit is contained in:
parent
fddfe80222
commit
f8d79d0ecc
@ -60,6 +60,7 @@ func healthy() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
if got, want := resp.StatusCode, http.StatusOK; got != want {
|
if got, want := resp.StatusCode, http.StatusOK; got != want {
|
||||||
b, _ := ioutil.ReadAll(resp.Body)
|
b, _ := ioutil.ReadAll(resp.Body)
|
||||||
return fmt.Errorf("%v: got HTTP %v (%s), want HTTP status %v",
|
return fmt.Errorf("%v: got HTTP %v (%s), want HTTP status %v",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user