Browse Source

add a timeout

pull/853/head
Chris Lu 6 years ago
parent
commit
834f414af9
  1. 1
      weed/server/raft_server.go

1
weed/server/raft_server.go

@ -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…
Cancel
Save