Skip to content

Commit c4073ad

Browse files
authored
GODRIVER-2623 - Use http.Transport.Clone from golang 1.13 (#1115)
1 parent 8bcd467 commit c4073ad

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

internal/http.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ package internal // import "go.mongodb.org/mongo-driver/internal"
88

99
import (
1010
"net/http"
11-
"time"
1211
)
1312

1413
// DefaultHTTPClient is the default HTTP client used across the driver.
1514
var DefaultHTTPClient = &http.Client{
16-
// TODO(GODRIVER-2623): Use "http.DefaultTransport.Clone" once we change the minimum supported Go version to 1.13.
17-
Transport: &http.Transport{
18-
Proxy: http.ProxyFromEnvironment,
19-
MaxIdleConns: 100,
20-
IdleConnTimeout: 90 * time.Second,
21-
TLSHandshakeTimeout: 10 * time.Second,
22-
ExpectContinueTimeout: 1 * time.Second,
23-
},
15+
Transport: http.DefaultTransport.(*http.Transport).Clone(),
2416
}
2517

2618
// CloseIdleHTTPConnections closes any connections which were previously

0 commit comments

Comments
 (0)