mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
server: set short dial timeout for raft communication
This commit is contained in:
parent
28634fce47
commit
5283002132
@ -20,6 +20,7 @@ import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
@ -74,6 +75,7 @@ func New(c *config.Config) (*Server, error) {
|
||||
|
||||
tr := new(http.Transport)
|
||||
tr.TLSClientConfig = tc
|
||||
tr.Dial = (&net.Dialer{Timeout: 200 * time.Millisecond}).Dial
|
||||
client := &http.Client{Transport: tr}
|
||||
|
||||
s := &Server{
|
||||
|
Loading…
x
Reference in New Issue
Block a user