Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix responsive problems when cancelling during a BITS download #4429
When a BITS job has encountered a transient error you have to always for for 2 weeks before you can cancel setup.
In transient error states, BITS does not call into our callback. The BITS callback handles canceling based on the result of the progress callback. If the transient error state persists, we may not get another call into the BITS callback until the BITS job times out, so the user may not be able to cancel the setup until the BITS job times out.
To fix this, update WaitForCompletion (which waits for the BITS job to finish) to periodically check for cancel if the BITS job isn't transferring. (20914)