From edb408bc22c1262c77f1c14af45966aa6d9f5385 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 0c177599b..1fc739d64 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.