tus-android-client
tus-android-client copied to clipboard
The example should compare uploadChunk() against -1
https://github.com/tus/tus-android-client/blob/master/example/src/main/java/io/tus/android/example/MainActivity.java#L166 loops while(!isCancelled() && uploader.uploadChunk() > 0)
. However, according to https://github.com/tus/tus-java-client/blob/master/src/main/java/io/tus/java/client/TusUploader.java#L18 and https://github.com/tus/tus-java-client/blob/master/src/main/java/io/tus/java/client/TusUploader.java#L182, uploadChunk()
may return 0 while the upload is not finished yet (for example, while the connection is down?).
Please fix the example to loop while(!isCancelled() && uploader.uploadChunk() > 1)
instead.
Thanks for bringing this to our attention! Would it be possible for you to open a PR for this?