浏览代码

unlock downloadu in case or requestDownload err

Bruce MacDonald 1 年之前
父节点
当前提交
907e6c56b3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      server/download.go

+ 1 - 0
server/download.go

@@ -85,6 +85,7 @@ func monitorDownload(ctx context.Context, mp ModelPath, regOpts *RegistryOptions
 			// resume the download
 			// resume the download
 			resp, err := requestDownload(ctx, mp, regOpts, f)
 			resp, err := requestDownload(ctx, mp, regOpts, f)
 			if err != nil {
 			if err != nil {
+				downloadMu.Unlock()
 				return fmt.Errorf("resume: %w", err)
 				return fmt.Errorf("resume: %w", err)
 			}
 			}
 			inProgress.Store(f.Digest, f)
 			inProgress.Store(f.Digest, f)