-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
TypeError: Cannot read property 'unref' of undefined #44
Comments
@lacker What environment are you running this in? It looks like this._timeout = setTimeout(() => this._onTimeout(), this._timeoutMs)
if (this._timeoutUnref && this._timeout.unref) this._timeout.unref() |
Ah, I should have updated this issue. I tracked it down, it's from within a unit test that uses jest, which in turn uses jsdom for its "window" object, during the cleanup phase. The jsdom window It would be handy just to make webtorrent work within test environments if this code also checked that |
Thanks for following up, @lacker. We use |
I'm getting an error from within the bittorrent-protocol module when running a simple WebTorrent download.
Looks like
this._timeoutUnref
is set butthis._timeout
isn't. I'm just creating a client, callingclient.add(magnet)
on it, and waiting for the "done" event on the response torrent.The text was updated successfully, but these errors were encountered: