Skip to content

Commit 6576990

Browse files
committed
Apply max concurrent chunk uploads retrieved from server capabilities
Signed-off-by: Claudio Cambra <[email protected]>
1 parent 4a1377e commit 6576990

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gui/folder.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,11 @@ SyncOptions Folder::initializeSyncOptions() const
11511151
opt._confirmExternalStorage = cfgFile.confirmExternalStorage();
11521152
opt._moveFilesToTrash = cfgFile.moveToTrash();
11531153
opt._vfs = _vfs;
1154-
opt._parallelNetworkJobs = account->isHttp2Supported() ? 20 : 6;
1154+
1155+
const auto capsMaxConcurrentChunkUploads = account->capabilities().maxConcurrentChunkUploads();
1156+
opt._parallelNetworkJobs = capsMaxConcurrentChunkUploads > 0
1157+
? capsMaxConcurrentChunkUploads
1158+
: account->isHttp2Supported() ? 20 : 6;
11551159

11561160
// Chunk V2: Size of chunks must be between 5MB and 5GB, except for the last chunk which can be smaller
11571161
const auto cfgMinChunkSize = cfgFile.minChunkSize();

0 commit comments

Comments
 (0)