Skip to content

Commit

Permalink
use raft timeout from consts
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-kripakov-m10 committed Jan 4, 2024
1 parent cbb6cb5 commit 16a002b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dkron/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16a002b

Please sign in to comment.