소스 검색

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
 			resp, err := requestDownload(ctx, mp, regOpts, f)
 			if err != nil {
+				downloadMu.Unlock()
 				return fmt.Errorf("resume: %w", err)
 			}
 			inProgress.Store(f.Digest, f)