Browse Source

raft: adding idle connection time out

another attempt to fix https://github.com/chrislusf/seaweedfs/issues/825
pull/846/head
Chris Lu 6 years ago
parent
commit
3f56b12ed4
  1. 1
      weed/server/raft_server.go

1
weed/server/raft_server.go

@ -44,6 +44,7 @@ func NewRaftServer(r *mux.Router, peers []string, httpAddr string, dataDir strin
var err error
transporter := raft.NewHTTPTransporter("/cluster", time.Second)
transporter.Transport.MaxIdleConnsPerHost = 1024
transporter.Transport.IdleConnTimeout = time.Second
glog.V(0).Infof("Starting RaftServer with %v", httpAddr)
// Clear old cluster configurations if peers are changed

Loading…
Cancel
Save