aboutsummaryrefslogtreecommitdiff
path: root/weed/util/http_util.go
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2021-02-18 13:57:34 +0800
committerGitHub <noreply@github.com>2021-02-18 13:57:34 +0800
commitc8f56f5712c1efffc46de95a8057ed09c21da2db (patch)
treebc3330e274901d782395b7396cb54d7cc42608b1 /weed/util/http_util.go
parent12a78335860c4b1e220748e4adc4097050af5272 (diff)
parent3575d41009e4367658e75e6ae780c6260b80daf9 (diff)
downloadseaweedfs-c8f56f5712c1efffc46de95a8057ed09c21da2db.tar.xz
seaweedfs-c8f56f5712c1efffc46de95a8057ed09c21da2db.zip
Merge pull request #2 from chrislusf/master
Diffstat (limited to 'weed/util/http_util.go')
-rw-r--r--weed/util/http_util.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/util/http_util.go b/weed/util/http_util.go
index 2cd69b01b..eff282bab 100644
--- a/weed/util/http_util.go
+++ b/weed/util/http_util.go
@@ -21,6 +21,7 @@ var (
func init() {
Transport = &http.Transport{
+ MaxIdleConns: 1024,
MaxIdleConnsPerHost: 1024,
}
client = &http.Client{
@@ -312,7 +313,7 @@ func ReadUrlAsStream(fileUrl string, cipherKey []byte, isContentGzipped bool, is
}
func readEncryptedUrl(fileUrl string, cipherKey []byte, isContentCompressed bool, isFullChunk bool, offset int64, size int, fn func(data []byte)) (bool, error) {
- encryptedData, retryable, err := Get(fileUrl)
+ encryptedData, retryable, err := FastGet(fileUrl)
if err != nil {
return retryable, fmt.Errorf("fetch %s: %v", fileUrl, err)
}