Before lazy connection, when the peer disconnected, the status switched to disconnected.

After implementing lazy connection, the peer state is connecting, so we did not decrease the reference counters on the routes.
This commit is contained in:
Zoltán Papp
2025-05-31 20:14:55 +02:00
parent aa07b3b87b
commit 7573dfb354

View File

@@ -232,7 +232,7 @@ func (c *clientNetwork) watchPeerStatusChanges(ctx context.Context, peerKey stri
return
case <-c.statusRecorder.GetPeerStateChangeNotifier(peerKey):
state, err := c.statusRecorder.GetPeer(peerKey)
if err != nil || state.ConnStatus == peer.StatusConnecting {
if err != nil {
continue
}
peerStateUpdate <- struct{}{}