Skip to content

Commit

Permalink
bitswap: fix a minor data race
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <[email protected]>
  • Loading branch information
whyrusleeping committed Aug 4, 2016
1 parent 241bfce commit 4e1036d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exchange/bitswap/workers.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ func (bs *Bitswap) rebroadcastWorker(parent context.Context) {
case <-broadcastSignal.C: // resend unfulfilled wantlist keys
log.Event(ctx, "Bitswap.Rebroadcast.active")
for _, e := range bs.wm.wl.Entries() {
e := e
bs.findKeys <- &e
}
case <-parent.Done():
Expand Down

0 comments on commit 4e1036d

Please sign in to comment.