[#2260] network/cache: Ignore clients only on Dial errors

The problem is that accidental timeout errors can make us to ignore
other nodes for some time. The primary purpose of the whole ignore
mechanism is not to degrade in case of failover. For this case,
closing connection and limiting the amount of dials is enough.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-02-16 11:03:43 +03:00 committed by fyrchik
parent bf1e59bb83
commit 0b61a3c961

View file

@ -202,7 +202,6 @@ func (s *singleClient) invalidate() {
_ = s.client.Close()
}
s.client = nil
s.lastAttempt = time.Now()
s.Unlock()
}