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

connmgr: Only mark persistent peer reconn pending. #3238

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Apr 30, 2024

The current code is incorrectly treating non-persistent peer requests as though they will be reconnected to whenever the target number of outbound peers has not been reached by marking them as pending and logging the reconnection attempt that will never come. In addition to the spurious logging, it also means that manually attempting to reconnect to such a peer will incorrectly believe a connection is already pending.

This resolves that issue by only logging the attempt and adding the connection request back to the pending map for persistent peers.

@davecgh davecgh added this to the 1.9.0 milestone Apr 30, 2024
The current code is incorrectly treating non-persistent peer requests as
though they will be reconnected to whenever the target number of
outbound peers has not been reached by marking them as pending and
logging the reconnection attempt that will never come.  In addition to
the spurious logging, it also means that manually attempting to
reconnect to such a peer will incorrectly believe a connection is
already pending.

This resolves that issue by only logging the attempt and adding the
connection request back to the pending map for persistent peers.
@davecgh davecgh force-pushed the connmgr_only_mark_persistent_peer_reconn_pending branch from 8724f58 to 02eaf5f Compare May 2, 2024 14:55
@davecgh davecgh merged commit 02eaf5f into decred:master May 2, 2024
2 checks passed
@davecgh davecgh deleted the connmgr_only_mark_persistent_peer_reconn_pending branch May 2, 2024 14:58
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

Successfully merging this pull request may close these issues.

2 participants