Remove http timeout option on getting catalog

This commit is contained in:
Penghao Cen 2016-12-12 20:42:28 +08:00
parent ee4cfa68d8
commit 1e57166962

View File

@ -20,7 +20,7 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"time" // "time"
"github.com/vmware/harbor/src/common/utils" "github.com/vmware/harbor/src/common/utils"
registry_error "github.com/vmware/harbor/src/common/utils/registry/error" registry_error "github.com/vmware/harbor/src/common/utils/registry/error"
@ -77,7 +77,9 @@ func NewRegistryWithModifiers(endpoint string, insecure bool, modifiers ...Modif
return NewRegistry(endpoint, &http.Client{ return NewRegistry(endpoint, &http.Client{
Transport: transport, Transport: transport,
Timeout: 30 * time.Second, // If there are hunderds of repositories in docker registry,
// timeout option will abort HTTP request on getting catalog
// Timeout: 30 * time.Second,
}) })
} }