diff --git a/service/scraper/bucket.go b/service/scraper/bucket.go index 37346ab9..b4c0b3a7 100644 --- a/service/scraper/bucket.go +++ b/service/scraper/bucket.go @@ -18,7 +18,7 @@ func (b *Bucket) NewTransaction(swarms []model.Torrent) (t *Transaction) { id := rand.Uint32() // get good id _, ok := b.transactions[id] - for !ok { + for ok { id = rand.Uint32() _, ok = b.transactions[id] }