Merge pull request #127 from coreos/fabxc-patch-1
Close response body on status code error
This commit is contained in:
Коммит
2a076f5948
|
@ -164,6 +164,7 @@ func monitorEtcdCluster(host string, httpClient *http.Client, watchVersion strin
|
|||
return
|
||||
}
|
||||
if resp.StatusCode != 200 {
|
||||
resp.Body.Close()
|
||||
errc <- errors.New("Invalid status code: " + resp.Status)
|
||||
return
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче