Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconnectToPeer method does not stop. #2894

Closed
qkrwnsgh1288 opened this issue Nov 21, 2018 · 1 comment
Closed

reconnectToPeer method does not stop. #2894

qkrwnsgh1288 opened this issue Nov 21, 2018 · 1 comment

Comments

@qkrwnsgh1288
Copy link

qkrwnsgh1288 commented Nov 21, 2018

Let's say that the situation is node1 and persistentNode are connected, and then persistentNode is stopped, and then persistentNode is restarted.

node1 calls the reconnectToPeer goroutine to establish a connection with the persistentPeer.
persistentPeer knows the address of node1, so it makes an outbound connection to node1 for reconnection.
node1 accepts the connection request of the persistentPeer and connects to each other.
However, the reconnectToPeer goroutine does not know this and continues to send a connection request to the persistentPeer.
So, when the persistentPeer receives the request, it continually exposes an error that is already registered as a peer.

To summarize,
When the persistentPeer sends a connection request to the node1 first, the reconnectToPeer goroutine, which is driven by the peer side, does not know that the connection is established and sends a connection request continuously.

This seems to be a waste of resources.

@ebuchman
Copy link
Contributor

Thanks - believe this is a duplicate of #2716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants