mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
add a timeout
This commit is contained in:
parent
09471b46f9
commit
834f414af9
|
@ -45,6 +45,7 @@ func NewRaftServer(r *mux.Router, peers []string, httpAddr string, dataDir strin
|
||||||
transporter := raft.NewHTTPTransporter("/cluster", time.Second)
|
transporter := raft.NewHTTPTransporter("/cluster", time.Second)
|
||||||
transporter.Transport.MaxIdleConnsPerHost = 1024
|
transporter.Transport.MaxIdleConnsPerHost = 1024
|
||||||
transporter.Transport.IdleConnTimeout = time.Second
|
transporter.Transport.IdleConnTimeout = time.Second
|
||||||
|
transporter.Transport.ResponseHeaderTimeout = time.Second
|
||||||
glog.V(0).Infof("Starting RaftServer with %v", httpAddr)
|
glog.V(0).Infof("Starting RaftServer with %v", httpAddr)
|
||||||
|
|
||||||
// Clear old cluster configurations if peers are changed
|
// Clear old cluster configurations if peers are changed
|
||||||
|
|
Loading…
Reference in a new issue