Fix file descriptor leaking.

This commit is contained in:
Deluan
2023-02-02 10:36:27 -05:00
parent a1a5b2fc30
commit 4a7e86e989
2 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ func (a *artwork) Get(ctx context.Context, artID model.ArtworkID, size int) (rea
r, err := a.cache.Get(ctx, artReader)
if err != nil {
if !errors.Is(err, context.Canceled) {
if !errors.Is(err, context.Canceled) && !errors.Is(err, ErrUnavailable) {
log.Error(ctx, "Error accessing image cache", "id", artID, "size", size, err)
}
return nil, time.Time{}, err