You've already forked VptPassiveAdapter
优化http连接池
This commit is contained in:
@@ -58,8 +58,7 @@ func OssUpload(ctx context.Context, url, filePath string) error {
|
||||
}
|
||||
req.Header.Set("Content-Type", "video/mp4")
|
||||
req.Header.Set("Content-Length", fmt.Sprintf("%d", len(fileBytes)))
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
resp, err := GetUploadClient().Do(req)
|
||||
if err != nil {
|
||||
span.SetAttributes(attribute.String("error", err.Error()))
|
||||
span.SetStatus(codes.Error, "发送请求失败")
|
||||
|
Reference in New Issue
Block a user