Browse Source

server: add TLSHandshakeTimeout for peer hub client

Yicheng Qin 11 years ago
parent
commit
c9edb762b7
1 changed files with 1 additions and 0 deletions
  1. 1 0
      etcd/etcd.go

+ 1 - 0
etcd/etcd.go

@@ -76,6 +76,7 @@ func New(c *config.Config) (*Server, error) {
 	tr := new(http.Transport)
 	tr.TLSClientConfig = tc
 	tr.Dial = (&net.Dialer{Timeout: 200 * time.Millisecond}).Dial
+	tr.TLSHandshakeTimeout = 10 * time.Second
 	tr.ResponseHeaderTimeout = defaultTickDuration * defaultHeartbeat
 	client := &http.Client{Transport: tr}