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

On wire close, stop ut_pex sending interval #706

Merged
merged 1 commit into from Mar 29, 2016
Merged
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

@@ -669,6 +669,11 @@ Torrent.prototype._onWire = function (wire, addr) {
self.swarm.removePeer(peer)
}
})

wire.once('close', function () {
// Stop sending updates to remote peer
wire.ut_pex.reset()
})
}

// Hook to allow user-defined `bittorrent-protocol` extensions
@@ -724,7 +729,7 @@ Torrent.prototype._onWireWithMetadata = function (wire) {
wire.unchoke()
})

wire.on('close', function () {
wire.once('close', function () {
clearTimeout(timeoutId)
})

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.