Skip to content

Commit 65af391

Browse files
author
tanshanshan
committed
add closing client
1 parent 516876b commit 65af391

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/e2e/autoscaling/cluster_size_autoscaling.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,11 @@ func executeHTTPRequest(method string, url string, body string) (string, error)
11631163
return "", err
11641164
}
11651165
resp, err := client.Do(req)
1166+
if err != nil {
1167+
return "", err
1168+
}
1169+
defer resp.Body.Close()
1170+
11661171
respBody, err := ioutil.ReadAll(resp.Body)
11671172
if err != nil {
11681173
return "", err

0 commit comments

Comments
 (0)