Skip to content

Commit

Permalink
fix client list corruption when no client is available
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Nov 21, 2023
1 parent 6733326 commit 70a9bdd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ func (indexer *Indexer) GetReadyClient(archive bool, head []byte, skip []*Indexe
func (indexer *Indexer) GetReadyClients(archive bool, head []byte) []*IndexerClient {
headCandidates := indexer.GetHeadForks(true)
if len(headCandidates) == 0 {
return indexer.indexerClients
allCandidates := make([]*IndexerClient, len(indexer.indexerClients))
copy(allCandidates, indexer.indexerClients)
return allCandidates
}

var headFork *HeadFork
Expand Down

0 comments on commit 70a9bdd

Please sign in to comment.