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

ProgressCallback should report the actual downloaded amount of data and not the requested packets. #1543

Closed
wants to merge 1 commit into from
Closed

ProgressCallback should report the actual downloaded amount of data and not the requested packets. #1543

wants to merge 1 commit into from

Conversation

thirsch
Copy link

@thirsch thirsch commented Oct 21, 2020

$progressCallback should be called after a specific amount of data has been received and not, if its just requested, as the requested packets might be more as the available and received data.

This does not only solve the problem for $length = -1, because it requests 32 "slots" of max_packet_size packets nevertheless if the requested file is that big or not, it also solves the issue that requesting the data is not having the data delivered. Placing the call to $progressCallback later in the script, it reports the actual received amount of data.

…s been received and not, if its just requested, as the requested packets might be more as the available and received data.
@terrafrost
Copy link
Member

I'll try to take a look at this in the next few days - I've been without internet in Phantom Ranch (bottom of the Grand Canyon) and have one more days of hiking to do before I return to my hometown!

@thirsch
Copy link
Author

thirsch commented Oct 26, 2020

You should definitely use your remaining time at the Grand Canyon instead of reviewing this pr :) But happy to get feedback, after you are back to business.

@terrafrost
Copy link
Member

I cherry picked this into the 1.0 branch and merged into 2.0 / 3.0 / master:

b2ae60f

Thanks!

@terrafrost terrafrost closed this Nov 2, 2020
@thirsch
Copy link
Author

thirsch commented Nov 2, 2020

Thanks, are there any plans for the next release?

terrafrost referenced this pull request Aug 30, 2021
…s been received and not, if its just requested, as the requested packets might be more as the available and received data.
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.

None yet

2 participants