From 73491150d90546f46a4d4066d6d69a0d3055f511 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 21 Jan 2019 00:07:44 +0200 Subject: [PATCH] fix nonsensical check --- pubsub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubsub.go b/pubsub.go index b072826..54f82b1 100644 --- a/pubsub.go +++ b/pubsub.go @@ -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 }