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(dht): Self-connection guards in DhtNode #2123

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

teogeb
Copy link
Contributor

@teogeb teogeb commented Nov 26, 2023

When we receive connection event from transport, we have been checking if the connection is from this node. We check that fact both when we receive connected event from ITransport, and when we query the initial connections.

If the connection is from this node we now return from the methods and don't update the connections state.

This is a cherry-pick from #1803, i.e. the original author is @ptesavol.

Open question

  • Is the error state possible in practice? If we receive a connection from self, is that a bug? (In that case we should fix the bug and could ignore this PR. We could also remove the related error logging.)

@github-actions github-actions bot added the dht Related to DHT package label Nov 26, 2023
Copy link
Collaborator

@ptesavol ptesavol left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from streamr-1.0 to main December 27, 2023 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dht Related to DHT package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants