Change storageRESTTimeout to 1minute (#7398)

master
Harshavardhana 6 years ago committed by kannappanr
parent c184038b6a
commit a9032b52b8
  1. 7
      cmd/storage-rest-client.go

@ -25,7 +25,6 @@ import (
"net/url" "net/url"
"path" "path"
"strconv" "strconv"
"time"
"encoding/gob" "encoding/gob"
"encoding/hex" "encoding/hex"
@ -38,10 +37,6 @@ import (
xnet "github.com/minio/minio/pkg/net" xnet "github.com/minio/minio/pkg/net"
) )
// The timeout of TCP connect and sending/receiving
// data for all internode storage REST requests.
const storageRESTTimeout = 5 * time.Minute
func isNetworkError(err error) bool { func isNetworkError(err error) bool {
if err == nil { if err == nil {
return false return false
@ -405,7 +400,7 @@ func newStorageRESTClient(endpoint Endpoint) (*storageRESTClient, error) {
} }
} }
restClient, err := rest.NewClient(serverURL, tlsConfig, storageRESTTimeout, newAuthToken) restClient, err := rest.NewClient(serverURL, tlsConfig, rest.DefaultRESTTimeout, newAuthToken)
if err != nil { if err != nil {
return nil, err return nil, err
} }

Loading…
Cancel
Save