From 3f56b12ed40c1cebaa669003942d14af826ff42c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 22 Jan 2019 09:25:25 -0800 Subject: [PATCH] raft: adding idle connection time out another attempt to fix https://github.com/chrislusf/seaweedfs/issues/825 --- weed/server/raft_server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/weed/server/raft_server.go b/weed/server/raft_server.go index 2cc8252b8..68042da54 100644 --- a/weed/server/raft_server.go +++ b/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