From 6bcd777aa4cfb87521ffcbdfd7d9c50711fe89eb Mon Sep 17 00:00:00 2001 From: Chunzhu Li Date: Tue, 23 Nov 2021 16:03:10 +0800 Subject: [PATCH] delete httpClient --- v4/export/config.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/v4/export/config.go b/v4/export/config.go index 3ebd06dd..e05dc311 100644 --- a/v4/export/config.go +++ b/v4/export/config.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "net/http" "regexp" "strconv" "strings" @@ -527,18 +526,8 @@ func (conf *Config) createExternalStorage(ctx context.Context) (storage.External if err != nil { return nil, errors.Trace(err) } - httpClient := http.DefaultClient - httpClient.Timeout = 30 * time.Second - maxIdleConnsPerHost := http.DefaultMaxIdleConnsPerHost - if conf.Threads > maxIdleConnsPerHost { - maxIdleConnsPerHost = conf.Threads - } - transport := http.DefaultTransport.(*http.Transport).Clone() - transport.MaxIdleConnsPerHost = maxIdleConnsPerHost - httpClient.Transport = transport return storage.New(ctx, b, &storage.ExternalStorageOptions{ - HTTPClient: httpClient, SkipCheckPath: true, SendCredentials: false, })