⚡️ fix:Fix file download status update logic to avoid unnecessary error messages.
This commit is contained in:
parent
bf3162a9e9
commit
d5742a9d93
1 changed files with 9 additions and 9 deletions
|
|
@ -421,7 +421,6 @@ public class TelegramVerticle extends AbstractVerticle {
|
||||||
if (file.local == null) {
|
if (file.local == null) {
|
||||||
return Future.failedFuture("File not started downloading");
|
return Future.failedFuture("File not started downloading");
|
||||||
}
|
}
|
||||||
if (isPaused && !file.local.isDownloadingActive) {
|
|
||||||
if (file.local.isDownloadingCompleted) {
|
if (file.local.isDownloadingCompleted) {
|
||||||
return DataVerticle.fileRepository.updateStatus(
|
return DataVerticle.fileRepository.updateStatus(
|
||||||
file.id,
|
file.id,
|
||||||
|
|
@ -431,6 +430,7 @@ public class TelegramVerticle extends AbstractVerticle {
|
||||||
System.currentTimeMillis()
|
System.currentTimeMillis()
|
||||||
).compose(r -> Future.failedFuture("File is already downloaded successfully"));
|
).compose(r -> Future.failedFuture("File is already downloaded successfully"));
|
||||||
}
|
}
|
||||||
|
if (isPaused && !file.local.isDownloadingActive) {
|
||||||
return Future.failedFuture("File is not downloading");
|
return Future.failedFuture("File is not downloading");
|
||||||
}
|
}
|
||||||
if (!isPaused && file.local.isDownloadingActive) {
|
if (!isPaused && file.local.isDownloadingActive) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue