network: remove useless checks in discovery

These are useless.
This commit is contained in:
Roman Khimov 2019-10-27 16:11:32 +03:00
parent 0ed5dca9a2
commit 77a50d6dc6

View file

@ -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)
}