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

peer: Negotiate protocol ver before sending reject. #1249

Closed

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jun 3, 2018

This builds on top of PR #1248.

This modifies the initial peer protocol negotiation logic to negotiate the protocol version before sending any reject messages.

davecgh added 3 commits June 2, 2018 15:47
This rearranges some of the function definitions that pertain to initial
peer version negotiation and bringup so they are more consistent with
the preferred order used throughout the codebase.  In particular, the
functions are defined before they're first used and generally as close
as possible to the first use when they're defined in the same file.

There are no functional changes.
This removes an impossible to hit duplicate version check and adds a
test to ensure the behavior is correct.

Previously, the check was necessary because the handler was a part of
the input handler loop, however, the initial negotiation logic was
refactored some time ago to be synchronous and thus it is no longer
possible to receive a second version message in the refactored code
path.
This modifies the initial peer protocol negotiation logic to negotiate
the protocol version before sending any reject messages.
@davecgh davecgh force-pushed the peer_negotiate_pver_before_send branch from e10242b to 3711159 Compare June 3, 2018 03:56
@davecgh
Copy link
Member Author

davecgh commented Jun 3, 2018

Closing in favor of #1250 .

@davecgh davecgh closed this Jun 3, 2018
@davecgh davecgh deleted the peer_negotiate_pver_before_send branch June 3, 2018 05: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.

1 participant