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 upError trying to acess: client.ratio #463
Closed
Comments
This comment has been minimized.
This comment has been minimized.
|
Solved in 0.63.4 with efa410d Not yet published in NPM as feross hasn't been around. |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
According to API, I can access a "global" ratio.
But when I try to access:
client.ratioIt fails with:
TypeError: Cannot read property 'length' of undefined at Torrent.Object.defineProperty.get (/home/webtorrentapp/node_modules/webtorrent-hybrid/node_modules/webtorrent/lib/torrent.js:106:42)I tryied commenting
this.pieces.lengthin line:https://github.com/feross/webtorrent/blob/master/lib/torrent.js#L106
The error goes away.
Apparently is: I created a new torrent. The torrent is added in client.torrents, but no pieces were found / or downloaded yet. So when I call client.ratio, it calls all torrents and count his pieces, but no pieces were downloaded.