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

Running ipfs swarm connect on both nodes #421

Open
makew0rld opened this issue Jun 4, 2019 · 2 comments
Open

Running ipfs swarm connect on both nodes #421

makew0rld opened this issue Jun 4, 2019 · 2 comments

Comments

@makew0rld
Copy link
Contributor

makew0rld commented Jun 4, 2019

As I found out here, you need to run ipfs swarm connect on both nodes to actually successfully establish a priority connection. We do this in our code with direct mesh peers, but only on startup of the IPFS service.

This means that sometimes this command will only go one way (when a new node joins), or that sometimes the connection is joined much later (when a node sends it out to a node that doesn't have IPFS started, and then that node later starts it and sends it back). I am checking here and previously here how large the window is between call and response, but that still doesn't solve the former problem about when only one node issues the command.

One solution would be to turn ipfs-swarm.sh into a loop, every 30 seconds or whatever the window is. It could also potentially keep track of which nodes it had established priority connections with, and only the contact the ones it hadn't.

@makew0rld makew0rld self-assigned this Jun 4, 2019
@darkdrgn2k
Copy link
Contributor

I'd rather use some sort of discovery protocol possibly like #385

@makew0rld
Copy link
Contributor Author

I'm still confused about how this plays out, I've asked to confirm here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants