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(core-p2p): avoid duplicate connections with the same peer #2382

Merged
merged 5 commits into from Apr 9, 2019

Conversation

Projects
None yet
3 participants
@air1one
Copy link
Collaborator

air1one commented Apr 9, 2019

Proposed changes

When accepting new peer, connect to peer before pinging.
Before we were doing :

  • ping (without connecting before) : peer connection is made "on-the-fly" (ensureConnection method)
  • connect to peer : creates a new connection to same peer resulting in socket error as there is already the connection from ping

Also some minor refactor on peer api (removing obsolete status), and giving more time to wait for peer socket to be open.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

ArkEcosystemBot commented Apr 9, 2019

The ci/circleci: test-node11-functional job is failing as of 7099b2b325f02e5b8025e6745ee347bc4adc8310. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@faustbrian faustbrian changed the title fix: connect to peer before pinging fix(core-p2p): avoid duplicate connections with the same peer Apr 9, 2019

@faustbrian faustbrian merged commit 26dc71b into 2.4 Apr 9, 2019

7 of 8 checks passed

ci/circleci: test-node11-functional Your tests failed on CircleCI
Details
ci/circleci: test-node10-functional Your tests passed on CircleCI!
Details
ci/circleci: test-node10-integration-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-integration-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-unit Your tests passed on CircleCI!
Details
ci/circleci: test-node11-integration-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-integration-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-unit Your tests passed on CircleCI!
Details

@ArkEcosystemBot ArkEcosystemBot deleted the fix/p2p-peer-connect branch Apr 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.