Add comments for new tls transport

To explain why use this to avoid replication hang forever issue

Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
DQ 2020-04-19 16:23:32 +08:00
parent b728f04d0a
commit e0b98685f3

View File

@ -57,6 +57,8 @@ func init() {
} }
} }
// Use this instead of Default Transport in library because it sets ForceAttemptHTTP2 to true
// And that options introduced in go 1.13 will cause the https requests hang forever in replication environment
func newDefaultTransport() *http.Transport { func newDefaultTransport() *http.Transport {
return &http.Transport{ return &http.Transport{
Proxy: http.ProxyFromEnvironment, Proxy: http.ProxyFromEnvironment,