From c68fce89b5d466523db1cdaf2581331159125c3c Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Wed, 23 Aug 2017 14:54:10 -0500 Subject: [PATCH] Use config struct to create NetworkTransport layer when setting up raft --- agent/consul/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/consul/server.go b/agent/consul/server.go index 0c177599bf..1fc739d64c 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -494,7 +494,9 @@ func (s *Server) setupRaft() error { } // Create a transport layer. - trans := raft.NewNetworkTransportWithServerAddressProvider(s.raftLayer, 3, 10*time.Second, s) + transConfig := &raft.NetworkTransportConfig{Stream: s.raftLayer, MaxPool: 3, Timeout: 10 * time.Second, ServerAddressProvider: s} + + trans := raft.NewNetworkTransportWithConfig(transConfig) s.raftTransport = trans // Make sure we set the LogOutput.