summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/FileServer.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-28 18:12:33 +0200
committerSimon Rettberg2015-08-28 18:12:33 +0200
commit3fb192b673699167ad4f1d044ebf1fdd3bce1483 (patch)
tree0b8a7a83ad5e08aaa6b43065167b5c5890991528 /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/FileServer.java
parent[server] Working on image download from master server (diff)
downloadtutor-module-3fb192b673699167ad4f1d044ebf1fdd3bce1483.tar.gz
tutor-module-3fb192b673699167ad4f1d044ebf1fdd3bce1483.tar.xz
tutor-module-3fb192b673699167ad4f1d044ebf1fdd3bce1483.zip
[server] Tweak calculation of transfer count limits
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/FileServer.java')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/FileServer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/FileServer.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/FileServer.java
index f821813f..a08d4e15 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/FileServer.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/FileServer.java
@@ -135,7 +135,7 @@ public class FileServer implements IncomingEvent {
it.remove();
continue;
}
- activeUploads++;
+ activeUploads += Math.max(1, upload.getActiveConnectionCount());
}
if (activeUploads > Constants.MAX_UPLOADS) {
throw new TTransferRejectedException("Server busy. Too many running uploads (" + activeUploads
@@ -185,7 +185,7 @@ public class FileServer implements IncomingEvent {
it.remove();
continue;
}
- activeDownloads++;
+ activeDownloads += Math.max(1, download.getActiveConnectionCount());
}
if (activeDownloads > Constants.MAX_DOWNLOADS) {
throw new TTransferRejectedException("Server busy. Too many running uploads (" + activeDownloads