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

Download larger chunks from webseeds. #545

Merged
merged 2 commits into from Mar 1, 2016
Merged

Download larger chunks from webseeds. #545

merged 2 commits into from Mar 1, 2016

Conversation

@DiegoRBaquero
Copy link
Member

DiegoRBaquero commented Dec 28, 2015

This is the last part of the changes required to download larger chunks from webseeds.

1st: https://github.com/feross/bittorrent-swarm/pull/29
2nd: webtorrent/torrent-piece#1

Basically the changes done to torrent.js mean:

  • If the peer from which we are going to make a request is a webseed, then reserve all remaining pieces; if the request fails, cancel all those pieces.
  • set the chunks and check for piece completion

This should fix issue #534 :)

@feross

This comment has been minimized.

Copy link
Member

feross commented Mar 1, 2016

I'm taking a look at this now. Super sorry for the huge delay 😊

@@ -1063,6 +1063,8 @@ Torrent.prototype._request = function (wire, index, hotswap) {
var self = this
var numRequests = wire.requests.length

var webPeer = wire.remotePort === 80 || wire.remotePort === 443

This comment has been minimized.

Copy link
@feross

feross Mar 1, 2016

Member

Normal peers can listen on port 80 or 443. There are no rules about what ports a client can use, so this might match a normal peer. Not a huge deal right now, but it's better to be explicit since we might add other custom code for web seeds in the future and it could cause trouble.

This comment has been minimized.

Copy link
@feross

feross Mar 1, 2016

Member

I fixed this up!

feross added a commit that referenced this pull request Mar 1, 2016
Download larger chunks from webseeds.
@feross feross merged commit 6033689 into master Mar 1, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@feross feross deleted the ws-large-chunks branch Mar 1, 2016
@feross

This comment has been minimized.

Copy link
Member

feross commented Mar 1, 2016

Excellent news! This is released as 0.81.0 👍 😎

feross added a commit that referenced this pull request Mar 1, 2016
@lock

This comment has been minimized.

Copy link

lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.