Skip to content

Commit

Permalink
auzre blob: don't handshake timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
peifan-tes committed Aug 28, 2020
1 parent 90864d1 commit 688cde2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/gateway/azure/gateway-azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"encoding/json"
"fmt"
"io"
"net"
"net/http"
"path"
"sort"
Expand Down Expand Up @@ -191,7 +192,14 @@ func (g *Azure) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, erro
}

c.AddToUserAgent(fmt.Sprintf("APN/1.0 MinIO/1.0 MinIO/%s", minio.Version))
c.HTTPClient = &http.Client{Transport: minio.NewCustomHTTPTransport()}
transport := minio.NewCustomHTTPTransport()
transport.DialContext = (&net.Dialer{
KeepAlive: 60 * time.Minute,
}).DialContext
transport.TLSHandshakeTimeout = 0
transport.ExpectContinueTimeout = 0
transport.MaxIdleConnsPerHost = 24
c.HTTPClient = &http.Client{Transport: transport}

return &azureObjects{
client: c.GetBlobService(),
Expand Down

0 comments on commit 688cde2

Please sign in to comment.