Update as comments.

This commit is contained in:
zhengjin 2020-11-14 13:52:53 +08:00
parent 9cfec44091
commit fb83028e8c

View File

@ -208,15 +208,10 @@ func registerSelf(address string) ([]byte, error) {
log.Printf("[goc][WARN]error occurred:%v, try again", err)
resp, err = http.DefaultClient.Do(req)
}
defer func() {
if resp != nil {
resp.Body.Close()
}
}()
if err != nil {
return nil, fmt.Errorf("failed to register into coverage center, err:%v", err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {