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

fix(p2p): some clean up around qri peers connect and upgradeToQriConnection #1489

Merged
merged 2 commits into from
Aug 10, 2020

Conversation

ramfox
Copy link
Member

@ramfox ramfox commented Aug 7, 2020

We already log.Debug that there was an upgrade error inside upgradeToQriConnection, there is no need to also log.Error this message as well. We expect that many of the connections that we will be making will not "speak" qri. This shouldn't be an error.

Also, when we connect directly to a peer using qri peers connect, since the command expects the peer's profile as a return value, we need to explicitly upgrade the connection so we know that the profile exists in the Profile store.

When we refactor, we really should be listening on a channel that is monitoring the profile exchange process & only trying to access the peer profile then. This is a temporary solution.

We already log.Debug that there was an upgrade error inside `upgradeToQriConnection`, there is no need to also `log.Error` this message as well. We expect that many of the connections that we will be making will not "speak" qri. This shouldn't be an error.
@ramfox ramfox added fix A bug fix network/p2p peer-2-peer-specific issues, subset of network issues labels Aug 7, 2020
@ramfox ramfox self-assigned this Aug 7, 2020
… we connect

When we connect directly to a peer using `qri peers connect`, since the command expects the peer's profile as a return value, we need to explicitly upgrade the connection so we know that the profile exists in the Profile store.

When we refactor, we really should be listening on a channel that is monitoring the profile exchange process & only trying to access the peer profile then. This is a temporary solution.
@ramfox ramfox requested a review from b5 August 7, 2020 21:56
Copy link
Member

@b5 b5 left a comment

Choose a reason for hiding this comment

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

Looks good!

@ramfox ramfox merged commit b7bb076 into master Aug 10, 2020
@ramfox ramfox deleted the refactor_upgrade_error branch August 10, 2020 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A bug fix network/p2p peer-2-peer-specific issues, subset of network issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants