Skip to content

Commit

Permalink
Apply max concurrent chunk uploads retrieved from server capabilities
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Jan 20, 2025
1 parent 00d4ac4 commit 3e63cbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,11 @@ SyncOptions Folder::initializeSyncOptions() const
opt._confirmExternalStorage = cfgFile.confirmExternalStorage();
opt._moveFilesToTrash = cfgFile.moveToTrash();
opt._vfs = _vfs;
opt._parallelNetworkJobs = account->isHttp2Supported() ? 20 : 6;

const auto capsMaxConcurrentUploads = account->capabilities().maxConcurrentChunkUploads();
opt._parallelNetworkJobs = maxConcurrentChunkUploads > 0
? maxConcurrentChunkUploads
: account->isHttp2Supported() ? 20 : 6;

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

0 comments on commit 3e63cbf

Please sign in to comment.