Skip to content

Commit 329eb1c

Browse files
Merge pull request #4316 from ipfs/fix/bitswap-active-peers
filter out "" from active peers in bitswap sessions
2 parents 08733c2 + 37296d3 commit 329eb1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

exchange/bitswap/session.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ func (s *Session) run(ctx context.Context) {
159159
case blk := <-s.incoming:
160160
s.tick.Stop()
161161

162-
s.addActivePeer(blk.from)
162+
if blk.from != "" {
163+
s.addActivePeer(blk.from)
164+
}
163165

164166
s.receiveBlock(ctx, blk.blk)
165167

0 commit comments

Comments
 (0)