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 connection bugs #635

Merged

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented Oct 16, 2022

Description

Fixes some bug in connection between nodes:

  • Add a timeout in tcp handle_connect. Default timeout is infinity so the process stay stuck in this function if the server is unreachable.
  • If a node changes it's ip, the connection module associated to the node is not notified. Now whenever a node is updated, if the connection informations change (ip, port, transport), the connection process is killed and a new one is started with the new informations

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Run 3 nodes
  • Stop one and restart it with other port parameter

Connection should be updated and nodes can contact each other

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Neylix Neylix added bug Something isn't working P2P Involve P2P networking labels Oct 16, 2022
@samuelmanzanera samuelmanzanera merged commit 2365fdd into archethic-foundation:develop Oct 17, 2022
@Neylix Neylix deleted the Fix-connection-bugs branch October 18, 2022 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2P Involve P2P networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants