unlock downloadu in case or requestDownload err

This commit is contained in:
Bruce MacDonald 2023-07-31 15:44:57 -04:00
parent 868e3b31c7
commit 907e6c56b3

View file

@ -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)