inference: Add missing defer (#62672)

Hi. It's me, crashy mc crasher.
This causes inference jobs to always return a context cancelled error. Not sure how that slipped through.

Luckily, we waited with merging this change until after the release so this shouldn't affect any customers.

Test plan:

Verified that locally inference works again.
This commit is contained in:
Erik Seliger 2024-05-14 21:38:34 +02:00 committed by GitHub
parent 7308d16db9
commit 7c8d9cd74b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,7 +35,7 @@ func (s *gitService) ReadDir(ctx context.Context, repo api.RepoName, commit api.
if err != nil {
return nil, err
}
it.Close()
defer it.Close()
files := make([]fs.FileInfo, 0)
for {