core/state/snapshot: fix leaking goroutines during state tests execution

This commit is contained in:
Martin Holst Swende 2020-05-01 15:12:02 +02:00
parent 510b6f90db
commit 25e487e679
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -257,6 +257,9 @@ func (dl *diskLayer) generate(stats *generatorStats) {
dl.lock.Unlock() dl.lock.Unlock()
// Someone will be looking for us, wait it out // Someone will be looking for us, wait it out
abort := <-dl.genAbort select {
abort <- nil case abort := <-dl.genAbort:
abort <- nil
default:
}
} }