Merge pull request #154 from libp2p/fix/issue-153

fix nonsensical check
This commit is contained in:
vyzo 2019-01-21 00:26:38 +02:00 committed by GitHub
commit ef065c2b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,7 +291,7 @@ func (p *PubSub) processLoop(ctx context.Context) {
for {
select {
case pid := <-p.newPeers:
if p.blacklist.Contains(pid) {
if _, ok := p.peers[pid]; ok {
log.Warning("already have connection to peer: ", pid)
continue
}