Skip to content

Commit

Permalink
fix clients list corruption when no client is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Nov 21, 2023
1 parent fba43d2 commit c4188f6
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 c4188f6

Please sign in to comment.