Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout setting and error callback question #1100

Closed
catchstar opened this issue Apr 12, 2017 · 2 comments
Closed

timeout setting and error callback question #1100

catchstar opened this issue Apr 12, 2017 · 2 comments

Comments

@catchstar
Copy link

@catchstar catchstar commented Apr 12, 2017

I have two question about webtorrent api.

i want to get file's information from magnet uri. so my code is :

let client = new WebTorrent();
let magnet = 'magnet:?xt=urn:btih:08BC48D2EF4887EAEBE759CA31736B6A7C6CABFB';

client.add(magnet, function (torrent) {
      // get information about torrent's files
      console.log(torrent.files);

      // stop download because just want file's information
      torrent.destroy();

});
client.on('error', function (err) {
      console.log(err)
});

i run the code on two vps. the first one is located in Japan, the second is located in US.

Japan vps result is:
no callback for a long time. And i can't find the timeout option from webtorrent api.

US vps result is:
args[0] = '[' + this.client._debugId + '] [' + this._debugId + '] ' + args[0]
TypeError: Cannot read property '_debugId' of null

this error is not occur on client.on('error') and stop my nodejs process. what is so bad.

nodejs version : v7.6.0
webtorrent version: 0.98.16

Maybe my question is how can i deal with the unavailable or poor quality magnet uri.
please help me solve the problems. Thank you.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 13, 2017

Fixed by: #1103

@feross feross closed this Apr 13, 2017
josephfrazier added a commit that referenced this issue Apr 13, 2017
Fixes: #1100
Fixes: #1101
@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.