-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Milestone
Description
In DialPeersAsync, we check if we're already dialing the peer, but not if we're already connected to them. Then we sleep a random amount before actually dialing them.
Since the PEX doesn't know about persistent peers, it's possible for the PEX to be dialing or even to have already connected to a peer during this time. Then the DialPeersAsync will try to dial, and when it fails, it will keep trying to reconnect, even if we're already connected!
I think this might also explain #2332
I think we want to centralize dialing into a single location so that these kind of races aren't possible.
Reactions are currently unavailable