提升桌面端自动更新安装包下载速度 Fix https://github.com/siyuan-note/siyuan/issues/5997

This commit is contained in:
Liang Ding 2022-09-28 11:45:46 +08:00
parent 2f20e64e20
commit 20ab5d9edc
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -147,7 +147,7 @@ func downloadInstallPkg(pkgURL, checksum string) {
logging.LogInfof("downloading install package [%s]", pkgURL)
client := req.C().SetTimeout(60 * time.Minute)
err := client.NewParallelDownload(pkgURL).SetConcurrency(8).SetSegmentSize(1024 * 1024 * 4).
err := client.NewParallelDownload(pkgURL).SetConcurrency(8).SetSegmentSize(1024 * 1024 * 2).
SetOutputFile(savePath).Do()
if nil != err {
logging.LogErrorf("download install package failed: %s", err)