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

Commit 1fd9ecb

Browse files
authored
dumpling/gcs: fix http client credential problem (#395)
1 parent 57cabc9 commit 1fd9ecb

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

v4/export/config.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"context"
77
"encoding/json"
88
"fmt"
9-
"net/http"
109
"regexp"
1110
"strconv"
1211
"strings"
@@ -527,18 +526,8 @@ func (conf *Config) createExternalStorage(ctx context.Context) (storage.External
527526
if err != nil {
528527
return nil, errors.Trace(err)
529528
}
530-
httpClient := http.DefaultClient
531-
httpClient.Timeout = 30 * time.Second
532-
maxIdleConnsPerHost := http.DefaultMaxIdleConnsPerHost
533-
if conf.Threads > maxIdleConnsPerHost {
534-
maxIdleConnsPerHost = conf.Threads
535-
}
536-
transport := http.DefaultTransport.(*http.Transport).Clone()
537-
transport.MaxIdleConnsPerHost = maxIdleConnsPerHost
538-
httpClient.Transport = transport
539529

540530
return storage.New(ctx, b, &storage.ExternalStorageOptions{
541-
HTTPClient: httpClient,
542531
SkipCheckPath: true,
543532
SendCredentials: false,
544533
})

0 commit comments

Comments
 (0)