reusing http connections in raft server

This commit is contained in:
Chris Lu 2014-03-16 13:49:49 -07:00
parent 41143b3b78
commit 1c044280d6

View file

@ -44,6 +44,8 @@ func NewRaftServer(r *mux.Router, version string, peers []string, httpAddr strin
var err error
transporter := raft.NewHTTPTransporter("/cluster")
transporter.Transport.MaxIdleConnsPerHost = 1024
s.raftServer, err = raft.NewServer(s.httpAddr, s.dataDir, transporter, nil, topo, "")
if err != nil {
glog.V(0).Infoln(err)