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 23, 2025
1 parent 59f8546 commit 46dc2a7
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 capsMaxConcurrentChunkUploads = account->capabilities().maxConcurrentChunkUploads();
opt._parallelNetworkJobs = capsMaxConcurrentChunkUploads > 0
? capsMaxConcurrentChunkUploads
: 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 46dc2a7

Please sign in to comment.