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

The example should compare uploadChunk() against -1 #36

Open
peter-lyons-kehl opened this issue Feb 5, 2020 · 1 comment
Open

The example should compare uploadChunk() against -1 #36

peter-lyons-kehl opened this issue Feb 5, 2020 · 1 comment
Labels

Comments

@peter-lyons-kehl
Copy link

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.

@Acconut
Copy link
Member

Acconut commented Feb 6, 2020

Thanks for bringing this to our attention! Would it be possible for you to open a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants