Torrent not downloading immediately after adding when only 1 seeding peer

461 views Asked by At

I'm having an issue with the startup speed of a torrent download.

So I have two libtorrent-based clients:

Client A(deluge) is the only client seeding a torrent. It's state is seeding, but it shows no peers yet.

Client B(an app I'm making) adds a torrent using

libtorrent_session.addTorrent(...

For some reason, client B doesn't start downloading immediately. It waits a few minutes, then client A's upload speed spikes up, and the torrent downloads to B.

Why is it waiting? Does this have something to do with announce interval? If that's the case, how can I mitigate that startup time, because I need the download to start immediately.

Shouldn't it just find the peer and download the file immediately?

I'm using both a tracker, and the public DHTs.

1

There are 1 answers

0
the8472 On

Without detailed information/logging I can only guess.

If one of your clients is behind a NAT then the other client can't establish the connection. Thus it takes time until the NATed client learns about the IP of the reachable one.

If they use a tracker that doesn't work it can take a while until DHT startup, which might also be delayed to try the tracker first.

how can I mitigate that startup time

make sure that both clients use the same tracker, that the tracker is operational and that both listening ports are reachable from the other side. Alternatively, the client might have a manual IP:port injection mechanism you could try.