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

Webseed update timer #1

Merged
merged 2 commits into from
Apr 20, 2024
Merged

Webseed update timer #1

merged 2 commits into from
Apr 20, 2024

Conversation

mh0lt
Copy link
Collaborator

@mh0lt mh0lt commented Apr 20, 2024

his fixes an issue with small files (1 to 2 pieces) when they are seeded from web peers into a sparse torrent network.

If there are a significant number of peers in the network which don't have the requested torrent on initial download a webpeer with the file is not guaranteed to be the selected request provider. When this happens if the webpeer does not do an update to its request state it will wait forever and the torrent will never get downloaded.

This fix also includes an update to steal processing in applyRequestState - so that rejecting and cancelled peers do not steal from a potentially good peer. Also the steal logic uses after instead of before in its time logic, to avoid a peer with equal time (which is zero at initial download) preemptively stealing as this creates a chain reaction on initial download.

@mh0lt mh0lt merged commit fa9fd1a into master Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant