summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2014-10-27 19:55:14 +0100
committerSimon Rettberg2014-10-27 19:55:14 +0100
commit3d1295e19c2e5a23676b79fbd7bfad53619a94f5 (patch)
tree238f55fe75fc79c93826ec7b752e5aba8d0bfca9
parent[client] fix uploads not completing (diff)
downloadtutor-module-3d1295e19c2e5a23676b79fbd7bfad53619a94f5.tar.gz
tutor-module-3d1295e19c2e5a23676b79fbd7bfad53619a94f5.tar.xz
tutor-module-3d1295e19c2e5a23676b79fbd7bfad53619a94f5.zip
Revert "[client] fix uploads not completing"
This reverts commit 56733637669d300b472be062fc7a85a49ede3322.
-rw-r--r--dozentenmodul/src/main/java/ftp/UploadTask.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/ftp/UploadTask.java b/dozentenmodul/src/main/java/ftp/UploadTask.java
index 4bf4ad1f..40a79f55 100644
--- a/dozentenmodul/src/main/java/ftp/UploadTask.java
+++ b/dozentenmodul/src/main/java/ftp/UploadTask.java
@@ -75,9 +75,9 @@ public class UploadTask extends SwingWorker<Void, Void> {
while ((bytesRead = inputStream.read(buffer)) != -1 && !isCancelled()) {
util.writeFileBytes(buffer, 0, bytesRead);
currentBytes += bytesRead;
- totalBytesRead += currentBytes;
long now = System.currentTimeMillis();
if (lastUpdate + UPDATE_INTERVAL_MS < now) {
+ totalBytesRead += currentBytes;
percentCompleted = (int) ((totalBytesRead * 100) / fileSize);
setProgress(percentCompleted);
lastBytes = (lastBytes * 2 + currentBytes) / 3;