From 77a50d6dc6cb20e34437b30f2cdc72411c633824 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sun, 27 Oct 2019 16:11:32 +0300 Subject: [PATCH] network: remove useless checks in discovery These are useless. --- pkg/network/discovery.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/network/discovery.go b/pkg/network/discovery.go index 64547bbda..adc8d0c9a 100644 --- a/pkg/network/discovery.go +++ b/pkg/network/discovery.go @@ -186,13 +186,9 @@ func (d *DefaultDiscovery) run() { case addr := <-d.connectedCh: delete(d.unconnectedAddrs, addr) - if !d.connectedAddrs[addr] { - d.connectedAddrs[addr] = true - } + d.connectedAddrs[addr] = true case addr := <-d.goodCh: - if !d.goodAddrs[addr] { - d.goodAddrs[addr] = true - } + d.goodAddrs[addr] = true case addr := <-d.unconnectedCh: delete(d.connectedAddrs, addr) }