File tree Expand file tree Collapse file tree 3 files changed +20
-13
lines changed
Expand file tree Collapse file tree 3 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import (
1515 "github.com/google/certificate-transparency/go/jsonclient"
1616 "github.com/google/certificate-transparency/go/x509"
1717 "github.com/google/certificate-transparency/go/x509util"
18- httpclient "github.com/mreiferson/go-httpclient"
1918 "golang.org/x/net/context"
2019)
2120
@@ -176,13 +175,17 @@ func dieWithUsage(msg string) {
176175func main () {
177176 flag .Parse ()
178177 httpClient := & http.Client {
179- Transport : & httpclient. Transport {
180- ConnectTimeout : 10 * time . Second ,
181- RequestTimeout : 30 * time .Second ,
178+ Timeout : 10 * time . Second ,
179+ Transport : & http. Transport {
180+ TLSHandshakeTimeout : 30 * time .Second ,
182181 ResponseHeaderTimeout : 30 * time .Second ,
183182 MaxIdleConnsPerHost : 10 ,
184183 DisableKeepAlives : false ,
185- }}
184+ MaxIdleConns : 100 ,
185+ IdleConnTimeout : 90 * time .Second ,
186+ ExpectContinueTimeout : 1 * time .Second ,
187+ },
188+ }
186189 var opts jsonclient.Options
187190 if * pubKey != "" {
188191 pubkey , err := ioutil .ReadFile (* pubKey )
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import (
1818 "github.com/google/certificate-transparency/go/jsonclient"
1919 "github.com/google/certificate-transparency/go/preload"
2020 "github.com/google/certificate-transparency/go/scanner"
21- httpclient "github.com/mreiferson/go-httpclient"
2221 "golang.org/x/net/context"
2322)
2423
@@ -152,15 +151,18 @@ func main() {
152151 }
153152 }()
154153
155- transport := & httpclient.Transport {
156- ConnectTimeout : 10 * time .Second ,
157- RequestTimeout : 30 * time .Second ,
154+ transport := & http.Transport {
155+ TLSHandshakeTimeout : 30 * time .Second ,
158156 ResponseHeaderTimeout : 30 * time .Second ,
159157 MaxIdleConnsPerHost : 10 ,
160158 DisableKeepAlives : false ,
159+ MaxIdleConns : 100 ,
160+ IdleConnTimeout : 90 * time .Second ,
161+ ExpectContinueTimeout : 1 * time .Second ,
161162 }
162163
163164 fetchLogClient , err := client .New (* sourceLogURI , & http.Client {
165+ Timeout : 10 * time .Second ,
164166 Transport : transport ,
165167 }, jsonclient.Options {})
166168 if err != nil {
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import (
1414 "github.com/google/certificate-transparency/go/client"
1515 "github.com/google/certificate-transparency/go/jsonclient"
1616 "github.com/google/certificate-transparency/go/scanner"
17- httpclient "github.com/mreiferson/go-httpclient"
1817)
1918
2019const (
@@ -100,12 +99,15 @@ func createMatcherFromFlags() (scanner.Matcher, error) {
10099func main () {
101100 flag .Parse ()
102101 logClient , err := client .New (* logURI , & http.Client {
103- Transport : & httpclient. Transport {
104- ConnectTimeout : 10 * time . Second ,
105- RequestTimeout : 30 * time .Second ,
102+ Timeout : 10 * time . Second ,
103+ Transport : & http. Transport {
104+ TLSHandshakeTimeout : 30 * time .Second ,
106105 ResponseHeaderTimeout : 30 * time .Second ,
107106 MaxIdleConnsPerHost : 10 ,
108107 DisableKeepAlives : false ,
108+ MaxIdleConns : 100 ,
109+ IdleConnTimeout : 90 * time .Second ,
110+ ExpectContinueTimeout : 1 * time .Second ,
109111 },
110112 }, jsonclient.Options {})
111113 if err != nil {
You can’t perform that action at this time.
0 commit comments