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

[core] Refresh the 'AmInterested' status regularly #601

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

alanmcgovern
Copy link
Owner

There are several cases where the 'AmInterested' status can change for a given peer, and it's not easy to provide an event for each of these.

For example, the 'interested' status is dependent on each bitfield added as an 'IgnoringBitfield' to the piecepicker. These bitfields can change arbitrarily. This async check will ensure that things will refresh regularly.

As updating the priority of a file does have a pretty clear user action associated with it, special case this to cause an immediate refresh of the 'AmInterested' status.

Fixes #597

There are several cases where the 'AmInterested' status can change
for a given peer, and it's not easy to provide an event for each
of these.

For example, the 'interested' status is dependent on each bitfield
added as an 'IgnoringBitfield' to the piecepicker. These bitfields
can change arbitrarily. This async check will ensure that things
will refresh regularly.

As updating the priority of a file does have a pretty clear user
action associated with it, special case this to cause an immediate
refresh of the 'AmInterested' status.
@alanmcgovern alanmcgovern marked this pull request as ready for review January 18, 2023 23:43
@alanmcgovern alanmcgovern merged commit 99b5f9f into master Jan 19, 2023
@alanmcgovern alanmcgovern deleted the fix-aminterested-status-refreshing branch January 19, 2023 00:22
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.

Client locks up and never starts downloading if it has nothing to download at start
1 participant