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: Allow pending outbound conn removal. #2033

Merged

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jan 11, 2020

NOTE: This is a resubmission of #1842 with the requested changes applied in a separate commit since the author of that PR was not responsive in addressing them for several months. I've squashed the commits in that PR per standard practice and also updated the commit title to conform to the code contribution guidelines, but otherwise left them unchanged and attributed to the original author to ensure proper credit is given. Along those lines, I've added a separate commit which applies the requested changes as well as adds the additional code needed to make it work with incompatible changes that have since been made to master in the mean time.

This PR resolves #1725. Currently, if there is a call made by dcrctl addnode <ip_addr:port> add to an unresponsive port, the connReq will repeatedly retry to connect until the timeout period has been reached. dcrctl addnode <ip_addr:port> remove will not stop the retry attempts. The PR removes the addr from the list of pending failed connections if the dcrctl addnode <ip_addr:port> remove does not find an active connection.

Fixes #1725.

@davecgh davecgh added this to the 1.6.0 milestone Jan 11, 2020
@davecgh davecgh force-pushed the connmgr_allow_pending_outbound_conn_removal branch from 7da7209 to 67c8631 Compare January 11, 2020 06:56
Copy link
Member

@matheusd matheusd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retested

RyanBRiley and others added 2 commits January 28, 2020 16:52
Modify `dcrctl addnode <ip_addr:port> remove` to remove the address from
the list of pending connections, preventing unnecessary retries.
This performs some minor cleanup to avoid extra allocations in the
code added to handle removal of pending outbound connections as well as
make it work properly with the new separation of the server from the
rpcserver code since it runs a different code path.
@davecgh davecgh force-pushed the connmgr_allow_pending_outbound_conn_removal branch from 67c8631 to a5480ac Compare January 28, 2020 22:52
@davecgh davecgh merged commit a5480ac into decred:master Jan 28, 2020
@davecgh davecgh deleted the connmgr_allow_pending_outbound_conn_removal branch January 28, 2020 22:56
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.

connmgr: Cannot remove unresponsive outbound peer
5 participants