Commit 6e4bb2aa authored by Jeromy's avatar Jeromy

dont create a new ticker each loop

parent fceb09da
......@@ -182,10 +182,11 @@ func (bs *Bitswap) rebroadcastWorker(parent context.Context) {
defer cancel()
broadcastSignal := time.After(rebroadcastDelay.Get())
tick := time.Tick(10 * time.Second)
for {
select {
case <-time.Tick(10 * time.Second):
case <-tick:
n := bs.wantlist.Len()
if n > 0 {
log.Debug(n, inflect.FromNumber("keys", n), "in bitswap wantlist")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment