internal/gitfs: close response body in Repo.handshake
This was missed in CL 328213. Change-Id: If62b9ee842b4b89725915ae74f755e66073264bd Reviewed-on: https://go-review.googlesource.com/c/website/+/352329 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Rhys Hiltner <rhys.hiltner@gmail.com>
This commit is contained in:
Родитель
3712d1ccfb
Коммит
f65c3a961a
|
@ -41,6 +41,7 @@ func (r *Repo) handshake() error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("handshake: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
data, err := io.ReadAll(resp.Body)
|
||||
if resp.StatusCode != 200 {
|
||||
return fmt.Errorf("handshake: %v\n%s", resp.Status, data)
|
||||
|
|
Загрузка…
Ссылка в новой задаче