This commit is contained in:
Jiajun Huang
2019-05-31 15:56:05 +08:00
parent 75383a95b3
commit 2d24879fa3
3 changed files with 18 additions and 2 deletions

View File

@ -79,10 +79,11 @@ func status() error {
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
return fmt.Errorf("admin api status code [%d]", resp.StatusCode)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {