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

feat(identify): do not implicitly dial on push #3843

Merged
merged 4 commits into from
Apr 28, 2023

Conversation

thomaseizinger
Copy link
Contributor

Description

Previously, we would implicitly establish a connection when the user wanted to push identify information to a peer. I believe that this is the wrong behaviour. Instead, I am suggesting to log a message that we are skipping the push to this peer.

Additionally, the way this is currently implemented does not make much sense. Dialing a peer takes time. In case we don't have a connection at all, it could be that we drop the push requests because there isn't an active handler and thus we would have unnecessarily established the connection.

Instead of fixing this - which would require buffering the push messages - I think we should just remove the implicit dial.

Notes & open questions

I stumbled over this when I refactored the identify behaviour as part of #3651. Making this change will make shipping #3651 easier.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Member

@mxinden mxinden 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 to me. Technically I think this is a breaking change. That said, I am not aware of anyone depending on the previous (flawed) behavior. Thus fine to merge as patch release.

@mergify mergify bot merged commit e3a1650 into master Apr 28, 2023
@mergify mergify bot deleted the feat/identify-remove-implicit-dial branch April 28, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants