Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

use p2p address for duplicate connection resolution - #10006

Merged
huangminghuang merged 2 commits into
developfrom
huangminghuang/duplicate-connection-fix
Feb 10, 2021
Merged

huangminghuang merged 2 commits into
developfrom
huangminghuang/duplicate-connection-fix

Conversation

@huangminghuang

Copy link
Copy Markdown
Contributor

Change Description

This PR fixes the problem where two nodeos establish p2p connections to each other, send go away messages to each other at the same time and then both connections are dropped without any retry.

Change Type

Select ONE:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@brianjohnson5972 brianjohnson5972 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just add that one comment and it is good.

}
else if (my_impl->p2p_address < msg.p2p_address) {
continue;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd like a comment like "only the p2p node with the higher of the 2 addresses will decide which connection is a duplicate, so there is no chance for both connections to be closed"

@huangminghuang
huangminghuang force-pushed the huangminghuang/duplicate-connection-fix branch from c41e28e to 614b928 Compare February 9, 2021 14:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants