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

fix EventEmitter memory leak #1365

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

fix EventEmitter memory leak

  • Loading branch information
bricewge committed Apr 26, 2018
commit 985e59ffa749f8ca8148f17a2abf7147e232ac5d
@@ -1500,9 +1500,6 @@ Torrent.prototype._request = function (wire, index, hotswap) {
wire.request(index, chunkOffset, chunkLength, function onChunk (err, chunk) {
if (self.destroyed) return

// TODO: what is this for?
if (!self.ready) return self.once('ready', function () { onChunk(err, chunk) })

if (r[i] === wire) r[i] = null

if (piece !== self.pieces[index]) return onUpdateTick()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.