Skip to content

Commit

Permalink
Allow stopping even if workers result channel is full. (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
cabrador authored Apr 22, 2024
1 parent 2772ef3 commit 570203f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion db/substate_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ func (i *substateIterator) start(numWorkers int) {
errCh <- err
return
}
resultChs[id] <- transaction
select {
case resultChs[id] <- transaction:
case <-i.stopCh:
return

}
}

}
Expand Down

0 comments on commit 570203f

Please sign in to comment.