Skip to content

Commit

Permalink
Merge pull request #4316 from ipfs/fix/bitswap-active-peers
Browse files Browse the repository at this point in the history
filter out "" from active peers in bitswap sessions
  • Loading branch information
whyrusleeping authored Oct 18, 2017
2 parents 08733c2 + 37296d3 commit 329eb1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exchange/bitswap/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ func (s *Session) run(ctx context.Context) {
case blk := <-s.incoming:
s.tick.Stop()

s.addActivePeer(blk.from)
if blk.from != "" {
s.addActivePeer(blk.from)
}

s.receiveBlock(ctx, blk.blk)

Expand Down

0 comments on commit 329eb1c

Please sign in to comment.