Closed proninyaroslav closed 7 years ago
I will need more information, we are not experience this problem in our clients. Do you mind trying 1.2.0.7-RC3
?
Ok, i will be try 1.2.0.7-RC3
.
I tested a new version and still get this behavior. My steps to reproduce the problem:
yes , some times i face this same issue , i occurs randomly. sometimes downloading starts and some times it does not start. same goes for fetch magnet , some time it fetches magnet quickly some times it timeouts a lot.
I revealed the pattern of this problem: this problem occurs only for those torrents that have been added using magnet links. With .torrent files this doesn't happen.
Ok, now we are talking :) can you point me to a source code link in github where I can see the relevant logic?
Code for downloading magnet here https://github.com/proninyaroslav/libretorrent/blob/master/app/src/main/java/org/proninyaroslav/libretorrent/core/TorrentFetcher.java . Before updating to 1.2.0.6
, I did not make any changes to the logic's work. I just updated lib to this version and this problem appeared.
I'm telling you, you need to stop creating a SessionManager
for fetchMagnet
, you are creating a session every time, and that mess with the DHT. I improved the code there, try to use SessionManager
as a singleton and let me know.
Yes, you told me about this problem, but I don't think that this affects the lack of trackers.
You are right, the lack of trackers is another problem, but I encourage you to change the code as soon as possible.
In any case, you need to remember that info-dicts stored in the DHT (the one retrieved via magnets) does not store the trackers. You have the trackers (and other parameters) in the magnet link url. If you want to retrieve all that information merged in the return of SessionManager#fetchManget
, use the override with the parameter extra=true
.
public byte[] fetchMagnet(String uri, int timeout, boolean extra);
public byte[] fetchMagnet(String uri, int timeout, final boolean extra, final int maxSize);
Ok, I will reorganize code and try changing call to the fetchMagnet
.
any luck @proninyaroslav ?
@gubatron i am not facing this problem anymore.
good to know!
Hello. After the upgrade to
1.2.0.6
, there were problems with downloading. Details here https://github.com/proninyaroslav/libretorrent/issues/79