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

bug: Can't reconnect relay client after restart #2145

Closed
AlejandroCabeza opened this issue Oct 20, 2023 · 2 comments · Fixed by #2576
Closed

bug: Can't reconnect relay client after restart #2145

AlejandroCabeza opened this issue Oct 20, 2023 · 2 comments · Fixed by #2576
Assignees
Labels
bug Something isn't working

Comments

@AlejandroCabeza
Copy link
Contributor

AlejandroCabeza commented Oct 20, 2023

Problem

After restarting the Relay client, it can't connect to a previously connected client, and thus not able to receive/send messages from/to it.
Connecting to a relay client it wasn't connected to (before restarting) does work.

Impact

...

To reproduce

  1. Instantiate two relay clients.
  2. Subscribe them to the same pubsub topic.
  3. Connect the two of them with peerManager.connectRelay.
  4. Run stop and start in one (or both) the nodes and their respective switches.
  5. Running connectRelay and publish a message in their subscribed pubsub topic. Running connectRelay leads to peer_manager.nim:connectRelay:179, a timeout error.
  6. Message won't arrive to the other relay client.

You can also check the test case named "Relay can receive messages after reboot and reconnect" in waku_relay/test_protocol.nim. Remember to rename it from xasyncTest to asyncTest before running, otherwise it'll be skipped.

Expected behavior

After restarting the client, I can successfully run connectRelay and then send/receive messages with the connected client.

nwaku version/commit hash

@AlejandroCabeza AlejandroCabeza added the bug Something isn't working label Oct 20, 2023
@chair28980
Copy link
Contributor

  • Might be expected behavior when disconnecting/reconnecting

@SionoiS SionoiS removed their assignment Dec 8, 2023
@Ivansete-status Ivansete-status self-assigned this Mar 11, 2024
@Ivansete-status
Copy link
Collaborator

@AlejandroCabeza thanks so much for the masterpiece issue. It is very well described and is indeed something we need to enhance. Also, notice that this issue needs the following PR to be merged vacp2p/nim-libp2p#1082

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants