One way abort() can be called on a chunk is by a failure detected by the doneHandler()
In that case, the chunk's status() would still be uploading what does not keep a retry from happening because it'd skip the uploadNextChunk() codepath.
But there is another case which is calling File.pause() where a call to resume() is expected to go through uploadNextChunk() which does check chunk's status() is pending. It's also semantically more adequate and that what this PR fixes.
This is a requirement for #348 which go deeper into testing pause/resume behaviors.
One way
abort()
can be called on a chunk is by a failure detected by thedoneHandler()
In that case, the chunk'sstatus()
would still beuploading
what does not keep a retry from happening because it'd skip theuploadNextChunk()
codepath.But there is another case which is calling
File.pause()
where a call toresume()
is expected to go throughuploadNextChunk()
which does check chunk'sstatus()
ispending
. It's also semantically more adequate and that what this PR fixes.This is a requirement for #348 which go deeper into testing pause/resume behaviors.