From 834f414af971a7cdee57e97f7bfcd5174f44757c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 26 Jan 2019 00:15:42 -0600 Subject: [PATCH] add a timeout --- 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 68042da54..ca1792ac6 100644 --- a/weed/server/raft_server.go +++ b/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.Transport.MaxIdleConnsPerHost = 1024 transporter.Transport.IdleConnTimeout = time.Second + transporter.Transport.ResponseHeaderTimeout = time.Second glog.V(0).Infof("Starting RaftServer with %v", httpAddr) // Clear old cluster configurations if peers are changed