-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
client.seed() doesn't start unless client is restarted #2781
Comments
Hey @f-r00t, After looking into the above logs, what I can see is that peer discovery via tcp/udp/http trackers and the dht is working as expected, and is discovering the correct externally accessible This eventually works due to peer discovery via bittorrent-lsd (local session discovery) discovering the internally accessible Three options to work around this is:
Note: testing with one device outside of your network will work as expected, but may not be desirable for your use case. Are you able to let me know if the assumptions above correct (two local peers, no hairpin NAT enabled) and if any of the three workarounds work for you? |
After checking further, it looks like we block outgoing connections specifically when seeding here, which prevents a seeding peer from connecting to the new peer as they are discovered via LSD and instead requires the joining peer to wait for the next announce from the seeding peer, which is what causes this long delay (between 1 and 5 minutes) and would prevent any outbound connections from seeding peers, which seems incorrect. The above workarounds will work for you, but I will investigate this further to fix outbound connections when seeding. |
🎉 This issue has been resolved in version 2.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What version of this package are you using?
2.2.1
What operating system, Node.js, and npm version?
macOS, Node 18.13.0, npm 8.18.3
What happened?
I am essentially having the same issue as this guy: #2375
When I run this seed code in one terminal:
And this leech code in another one:
Nothing happens until I restart the run of the seed code. So basically what I have to do is:
At which point the connection is done immediately and the file downloads.
Any ideas on how to resolve this?
Here is the debug log from the seeder:
And after restarting it:
The text was updated successfully, but these errors were encountered: