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

Can't reconnect to a peer? #37

Closed
natevw opened this issue May 11, 2015 · 2 comments
Closed

Can't reconnect to a peer? #37

natevw opened this issue May 11, 2015 · 2 comments

Comments

@natevw
Copy link

natevw commented May 11, 2015

Using the sample code and instructions in #36 (comment), I am able to get peer "test2" to connect to peer "test1" the first time. The test1 process has its mesh.accept handler called and I see the "INCOMING" log it generates.

However, if I kill the "test2" process and restart it, the still-running "test1" process does not seem to ever see it. The previous link instance it had doesn't seem to be doing anything anymore, but neither does the mesh.accept handler get triggered.

If I start a new processes "test3" with a new endpoint identity, the original "test1" process does see that come in and start communicating with it.

@rynomad
Copy link
Contributor

rynomad commented Jul 31, 2015

Hey There @natevw sorry for the long delay on this one. The problem seems to be coming from the test2 restart going back to it's lowest channelID, which gets blocked by test1 (since you're not supposed to reuse ID's unless you have a new exchange.) There's some wonky timing going on to cleanup old channels which gets exacerbated when you do a SIGINT exit without sending an end to the channel.

0.3.30 has a rudimentary fix that cleans up channels on SIGINT. Problems can still arise if you restart test2 before test1 cleans up the channel id's, but I'm working on it :)

@rynomad
Copy link
Contributor

rynomad commented Aug 29, 2015

Hey to all still wondering about this. It should be thoroughly fixed as of 0.4.0 (published to npm today).

@rynomad rynomad closed this as completed Aug 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants