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 upevent when torrent is complete #383
Comments
This comment has been minimized.
This comment has been minimized.
|
What makes you think that there are still more bytes to download after the |
This comment has been minimized.
This comment has been minimized.
|
I have the I also added |
This comment has been minimized.
This comment has been minimized.
|
@feross Here's an example of it: https://gist.github.com/webchaz/ffee62ba9db52c9355ed You'll see here that it will fire the |
This comment has been minimized.
This comment has been minimized.
|
@webchaz This issue is likely caused by us requesting the same pieces from multiple peers simultaneously. When the final piece arrives from a peer, we emit Just a guess. Not ideal, I agree. If you send a PR to fix this, I'll happily review it. |
I found that there's a
torrent.on('done')event, but this seems to trigger before the torrent is fully complete. The progress is at 100, but there's still some more bytes to download for another second or so. Is there a way to find out when it's completely finished?