From 16a002b59bd306513e88b87c96a919de1ae5d211 Mon Sep 17 00:00:00 2001 From: Ivan Kripakov Date: Thu, 21 Dec 2023 12:10:25 +0400 Subject: [PATCH] use raft timeout from consts --- dkron/agent.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dkron/agent.go b/dkron/agent.go index e51787643..5f163cd77 100644 --- a/dkron/agent.go +++ b/dkron/agent.go @@ -318,13 +318,11 @@ func (a *Agent) setupRaft() error { logger = a.logger.Logger.Writer() } - var serverAddressProvider raft.ServerAddressProvider = a.serverLookup - transConfig := &raft.NetworkTransportConfig{ Stream: a.raftLayer, MaxPool: 3, - Timeout: 10 * time.Second, - ServerAddressProvider: serverAddressProvider, + Timeout: raftTimeout, + ServerAddressProvider: a.serverLookup, } transport := raft.NewNetworkTransportWithConfig(transConfig) a.raftTransport = transport