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 upHow to remove a torrent for the client? #1101
Comments
This comment has been minimized.
This comment has been minimized.
|
Weird because the torrent is being added before the torrent callback is emitted: https://github.com/feross/webtorrent/blob/master/index.js#L261 |
This comment has been minimized.
This comment has been minimized.
|
@catchstar I ran your code and could not reproduce the issue with the latest version of WebTorrent. What version of |
This comment has been minimized.
This comment has been minimized.
|
@feross my vps could reproduce the issue but i can't login in right now.Because i receive a shutdown ticket from lindode support which say my program has a copyright-infringing question. |
This comment has been minimized.
This comment has been minimized.
|
@feross @DiegoRBaquero Hello, i reproduce the problem. Here my code: const WebTorrent = require('webtorrent')
let client = new WebTorrent();
// the torrentId is different with above
let torrentId = '08BC48D2EF4887EAEBE759CA31736B6A7C6CABFB';
client.add(torrentId);
client.on('torrent', function (torrent) {
console.log(torrent)
// occur an TypeError: Cannot read property '_debugId' of null
client.remove(torrentId);
});webtorrent version : 0.98.16 i try this code on two vps and occur error either. |
This comment has been minimized.
This comment has been minimized.
|
@feross @DiegoRBaquero and program will still run by the wire.request callback function it makes me feel so weird. |

My code:
but if change below like that, it will be ok:
i'm confused by this problem.
please help me to solve the problem.Thanks a lot.