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 detection of seeding peers #1076

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

Fix detection of seeding peers

  • Loading branch information
tobias-walsh committed Mar 12, 2017
commit 2f7583a523a4a84bee671e435033d18c3585fc2b
@@ -1046,10 +1046,10 @@ Torrent.prototype._onWireWithMetadata = function (wire) {
}
}

var i = 0
var i
function updateSeedStatus () {
if (wire.peerPieces.length !== self.pieces.length) return
for (; i < self.pieces.length; ++i) {
if (wire.peerPieces.buffer.length !== self.bitfield.buffer.length) return
for (i = 0; i < self.pieces.length; ++i) {
if (!wire.peerPieces.get(i)) return
}
wire.isSeeder = true
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.