-
Notifications
You must be signed in to change notification settings - Fork 446
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
Restarting a node quickly and connecting will not emit onConnect
events in registrar
#2378
Comments
onConnect
events in regigstraronConnect
events in registrar
This is what I get when I am starting up the node after closing 2024-01-25T23:54:38.968Z libp2p:transports creating listener for @libp2p/tcp on /ip4/127.0.0.1/tcp/0 It seems I dont get it by putting a delay before start and connect. Then it will look like this 2024-01-26T00:01:02.345Z libp2p:transports creating listener for @libp2p/tcp on /ip4/127.0.0.1/tcp/0 |
It seems to matter which node is dialling whom.. If the node that is not closing is dialing the the other node. Then it will fail, but the other way around it works. I assume that the node that is not stopping have a connection lingering that ought to close, which makes dialling again not possible. Given this, this might not be a problematic issue after all because it is usually the node that is starting that is starting to dial. But the only issue perhaps is that I received a You might close this if this is expected behaviour |
Version:
1.1.0
Subsystem:
Registrar, connection manager?
Severity:
Low
Description:
I am trying to track down issues I have with connections and realised that I get unexpected behaviours when restarting nodes
Steps to reproduce the error:
Create a protocol handler with
Expected behaviour onPeerConnected is emitted 2 times for both nodes.
Actual behaviour. onPeerConnected is never emitted on the last connect for any node. And the onPeerDisconnected is emitted late, after dialing has been resolved (looks like that the connection take a while to close (?))
Putting a delay between stopping and starting the node, or between starting and connecting, will solve this issue, but in a real world usecase where I refresh a tab in browser I suspect that this issue is causing the issues I am having.
The text was updated successfully, but these errors were encountered: