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

torrent: cancelBlocks on wire 'close' #253

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

torrent: cancelBlocks on wire 'close'

  • Loading branch information
astro committed Jan 22, 2015
commit 4643ec3b8952ef4c304d722ae04d2f7387fbbf1b
@@ -514,6 +514,9 @@ Torrent.prototype._onWireWithMetadata = function (wire) {

wire.on('close', function () {
clearTimeout(timeoutId)
wire.requests.forEach(function (req) {
self.storage.cancelBlock(req.piece, req.offset)
})
})

wire.on('choke', function () {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.