Browse Source

Merge pull request #34383 from wrfly/patch-1

fix client.Transport verify
Yong Tang 8 years ago
parent
commit
7843e40ad5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/client.go

+ 1 - 1
client/client.go

@@ -165,7 +165,7 @@ func NewClient(host string, version string, client *http.Client, httpHeaders map
 	}
 	}
 
 
 	if client != nil {
 	if client != nil {
-		if _, ok := client.Transport.(*http.Transport); !ok {
+		if _, ok := client.Transport.(http.RoundTripper); !ok {
 			return nil, fmt.Errorf("unable to verify TLS configuration, invalid transport %v", client.Transport)
 			return nil, fmt.Errorf("unable to verify TLS configuration, invalid transport %v", client.Transport)
 		}
 		}
 	} else {
 	} else {