Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit 095eb5c

Browse files
authored
dumpling/gcs: fix http client credential problem (#395) (#396)
1 parent 6f317de commit 095eb5c

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

v4/export/config.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"encoding/json"
99
"fmt"
1010
"io/ioutil"
11-
"net/http"
1211
"regexp"
1312
"strconv"
1413
"strings"
@@ -532,18 +531,8 @@ func (conf *Config) createExternalStorage(ctx context.Context) (storage.External
532531
if err != nil {
533532
return nil, errors.Trace(err)
534533
}
535-
httpClient := http.DefaultClient
536-
httpClient.Timeout = 30 * time.Second
537-
maxIdleConnsPerHost := http.DefaultMaxIdleConnsPerHost
538-
if conf.Threads > maxIdleConnsPerHost {
539-
maxIdleConnsPerHost = conf.Threads
540-
}
541-
transport := http.DefaultTransport.(*http.Transport).Clone()
542-
transport.MaxIdleConnsPerHost = maxIdleConnsPerHost
543-
httpClient.Transport = transport
544534

545535
return storage.New(ctx, b, &storage.ExternalStorageOptions{
546-
HTTPClient: httpClient,
547536
SkipCheckPath: true,
548537
SendCredentials: false,
549538
})

0 commit comments

Comments
 (0)