Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upWeird torrent delay when add and remove fast. #1231
Closed
Comments
This comment has been minimized.
This comment has been minimized.
|
It append for me only when using infoHash, but it work well using magnetUri. |
This comment has been minimized.
This comment has been minimized.
|
You should probably wait for the 'close' callback that indicates that the torrent is completely destroyed before you try to re-add it. There is cleanup that is asynchronous, so the torrent might not be done being cleaned up if you add again immediately. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Im running webtorrent over Electron using a webview for the process like the Webtorrent Desktop client.
Problem: If you add a torrent torrent using magnet (whatever) and then remove and try to add again, the torrent keep checking, and no data is loaded (no metadata, nothing), if you wait 1-2 minutes, and add again, the torrent works correctly. Appear to have some "timeout" to get the metadata ??
I add the torrent with webtorrent.add() and remove with webtorrent.remove(torrent) or torrent.destroy(), the problem happens in the 2 ways.
NOT WORKING LOG:
Wait 2 minutes, and add again.
WORKING LOG:
The diference I see is the lines after the "torrent-discovery dht announce", in the working log this happens:
in the non-working log this lines dont appear.