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 upWhat is the noPeers event expected behavior? #1622
Comments
This comment has been minimized.
This comment has been minimized.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This comment has been minimized.
This comment has been minimized.
|
I agree that the event doesn't seem very easy to work with. But wouldn't a healthy torrent never have an announce with no peers? |
This comment has been minimized.
This comment has been minimized.
|
Like I mentioned, the snippet above is a minimal reproductible example. I used the "Sintel" torrent present on the webtorrent.io homepage. The noPeers event is called a few times every time it's added. |
This comment has been minimized.
This comment has been minimized.
|
I think one of the reasons why this might be happening is because at the start of downloading a torrent, when there are no peers, the When the |
What version of WebTorrent?
@latest
What operating system and Node.js version?
@latest
Reproductible snippet :
Since the 'Sintel' torrent is a very healthy torrent with many active trackers and peers sharing it, I don't understand what would be the use of 'noPeers' if it's called on every announce with no peers.
Shouldn't the event only be called on edge cases when there are no active peers to continue download of the file, or on a very 'unhealthy' torrent with no peers at all to fetch metadata? This behavior makes the event almost useless in every case, unless I'm understanding it wrong. Thanks!