mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.3.0 -> release/2.4.0
* commit '48cc1b29c594c29690bda40dcc4e4142d6400b2e': 避免auzre请求未释放文件描述符
This commit is contained in:
@@ -487,6 +487,7 @@ func waitForComplatetion(client *autorest.Client, req *http.Request, resp *http.
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer asyncResp.Body.Close()
|
||||
if asyncResp.StatusCode == 202 {
|
||||
if _location := asyncResp.Header.Get("Location"); len(_location) > 0 {
|
||||
location = _location
|
||||
@@ -578,6 +579,7 @@ func _jsonRequest(client *autorest.Client, method, domain, baseURL, body string)
|
||||
log.Errorf("Azure %s request: %s \nbody: %s error: %v", req.Method, req.URL.String(), body, err)
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode == 404 {
|
||||
data := []byte{}
|
||||
|
||||
Reference in New Issue
Block a user