From 1d8ba05d098e334388a9244dc7a0de4e3ffc6ae0 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 10 May 2017 13:53:59 -0400 Subject: [PATCH] fix infinite loop shit --- service/scraper/bucket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/scraper/bucket.go b/service/scraper/bucket.go index b4c0b3a7..37346ab9 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] }