Skip to content

Commit

Permalink
lxd/cluster/recover: Preallocate nodes in Reconfigure
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
  • Loading branch information
tomponline committed Sep 14, 2021
1 parent 85c3799 commit 39b8e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lxd/cluster/recover.go
Expand Up @@ -139,8 +139,8 @@ func Reconfigure(database *db.Node, raftNodes []db.RaftNode) error {
}

localAddress := info.Address
nodes := []client.NodeInfo{}

nodes := make([]client.NodeInfo, 0, len(raftNodes))
for _, raftNode := range raftNodes {
nodes = append(nodes, raftNode.NodeInfo)

Expand Down

0 comments on commit 39b8e36

Please sign in to comment.